Debian Codegraph @

upstream/debian-unstable/man7/bootparam.7

raw
1 .\" Copyright 1995-1997, Paul Gortmaker <[email protected]>
2 .\" Copyright 1995-1997, Andries E. Brouwer <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH bootparam 7 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 bootparam \- introduction to boot time parameters of the Linux kernel
10 .SH DESCRIPTION
11 The Linux kernel accepts certain 'command-line options' or 'boot time
12 parameters' at the moment it is started.
13 In general, this is used to
14 supply the kernel with information about hardware parameters that
15 the kernel would not be able to determine on its own, or to avoid/override
16 the values that the kernel would otherwise detect.
17 .P
18 When the kernel is booted directly by the BIOS,
19 you have no opportunity to specify any parameters.
20 So, in order to take advantage of this possibility you have to
21 use a boot loader that is able to pass parameters, such as GRUB.
22 .SS The argument list
23 The kernel command line is parsed into a list of strings
24 (boot arguments) separated by spaces.
25 Most of the boot arguments have the form:
26 .P
27 .in +4n
28 .EX
29 name[=value_1][,value_2]...[,value_10]
30 .EE
31 .in
32 .P
33 where 'name' is a unique keyword that is used to identify what part of
34 the kernel the associated values (if any) are to be given to.
35 Note the limit of 10 is real, as the present code handles only 10 comma
36 separated parameters per keyword.
37 (However, you can reuse the same
38 keyword with up to an additional 10 parameters in unusually
39 complicated situations, assuming the setup function supports it.)
40 .P
41 Most of the sorting is coded in the kernel source file
42 .IR init/main.c .
43 First, the kernel
44 checks to see if the argument is any of the special arguments 'root=',
45 \&'nfsroot=', 'nfsaddrs=', 'ro', 'rw', 'debug', or 'init'.
46 The meaning of these special arguments is described below.
47 .P
48 Then it walks a list of setup functions
49 to see if the specified argument string (such as 'foo') has
50 been associated with a setup function ('foo_setup()') for a particular
51 device or part of the kernel.
52 If you passed the kernel the line
53 foo=3,4,5,6 then the kernel would search the bootsetups array to see
54 if 'foo' was registered.
55 If it was, then it would call the setup
56 function associated with 'foo' (foo_setup()) and hand it the arguments
57 3, 4, 5, and 6 as given on the kernel command line.
58 .P
59 Anything of the form 'foo=bar' that is not accepted as a setup function
60 as described above is then interpreted as an environment variable to
61 be set.
62 A (useless?) example would be to use 'TERM=vt100' as a boot
63 argument.
64 .P
65 Any remaining arguments that were not picked up by the kernel and were
66 not interpreted as environment variables are then passed onto PID 1,
67 which is usually the
68 .BR init (1)
69 program.
70 The most common argument that
71 is passed to the
72 .I init
73 process is the word 'single' which instructs it
74 to boot the computer in single user mode, and not launch all the usual
75 daemons.
76 Check the manual page for the version of
77 .BR init (1)
78 installed on
79 your system to see what arguments it accepts.
80 .SS General non-device-specific boot arguments
81 .TP
82 .B "'init=...'"
83 This sets the initial command to be executed by the kernel.
84 If this is not set, or cannot be found, the kernel will try
85 .IR /sbin/init ,
86 then
87 .IR /etc/init ,
88 then
89 .IR /bin/init ,
90 then
91 .I /bin/sh
92 and panic if all of this fails.
93 .TP
94 .B "'nfsaddrs=...'"
95 This sets the NFS boot address to the given string.
96 This boot address is used in case of a net boot.
97 .TP
98 .B "'nfsroot=...'"
99 This sets the NFS root name to the given string.
100 If this string
101 does not begin with '/' or ',' or a digit, then it is prefixed by
102 \&'/tftpboot/'.
103 This root name is used in case of a net boot.
104 .TP
105 .B "'root=...'"
106 This argument tells the kernel what device is to be used as the root
107 filesystem while booting.
108 The default of this setting is determined
109 at compile time, and usually is the value of the root device of the
110 system that the kernel was built on.
111 To override this value, and
112 select the second floppy drive as the root device, one would
113 use 'root=/dev/fd1'.
114 .IP
115 The root device can be specified symbolically or numerically.
116 A symbolic specification has the form
117 .IR /dev/XXYN ,
118 where XX designates the device type
119 (e.g.,
120 \&'hd' for ST-506 compatible hard disk,
121 with Y in \&'a'\[en]'d';
122 \&'sd' for SCSI compatible disk,
123 with Y in 'a'\[en]'e'),
124 Y the driver letter or number,
125 and N the number (in decimal) of the partition on this device.
126 .IP
127 Note that this has nothing to do with
128 the designation of these devices on your filesystem.
129 The '/dev/' part is purely conventional.
130 .IP
131 The more awkward and less portable numeric specification
132 of the above possible root devices
133 in major/minor format is also accepted.
134 (For example,
135 .I /dev/sda3
136 is major 8, minor 3, so you could use 'root=0x803' as an
137 alternative.)
138 .TP
139 .B 'rootdelay='
140 This parameter sets the delay (in seconds)
141 to pause before attempting to mount the root filesystem.
142 .TP
143 .B 'rootflags=...'
144 This parameter sets the mount option string for the root filesystem
145 (see also
146 .BR fstab (5)).
147 .TP
148 .B 'rootfstype=...'
149 The 'rootfstype' option tells the kernel to mount the root filesystem
150 as if it where of the type specified.
151 This can be useful (for example)
152 to mount an ext3 filesystem as ext2
153 and then remove the journal in the root filesystem,
154 in fact reverting its format from ext3 to ext2
155 without the need to boot the box from alternate media.
156 .TP
157 .B 'ro'
158 .TQ
159 .B 'rw'
160 The 'ro' option tells the kernel to mount the root filesystem
161 as 'read-only' so that filesystem consistency check programs (fsck)
162 can do their work on a quiescent filesystem.
163 No processes can write to files on the filesystem in question
164 until it is 'remounted' as read/write capable,
165 for example,
166 by 'mount \-w \-n \-o remount /'.
167 (See also
168 .BR mount (8).)
169 .IP
170 The 'rw' option tells the kernel to mount the root filesystem read/write.
171 This is the default.
172 .TP
173 .B "'resume=...'"
174 This tells the kernel the location of
175 the suspend-to-disk data that you want the machine to resume from
176 after hibernation.
177 Usually,
178 it is the same as your swap partition or file.
179 Example:
180 .IP
181 .in +4n
182 .EX
183 resume=/dev/hda2
184 .EE
185 .in
186 .TP
187 .B "'reserve=...'"
188 This is used to protect I/O port regions from probes.
189 The form of the command is:
190 .IP
191 .in +4n
192 .EX
193 .BI reserve= iobase,extent[,iobase,extent]...
194 .EE
195 .in
196 .IP
197 In some machines it may be necessary to prevent device drivers from
198 checking for devices (auto-probing) in a specific region.
199 This may be
200 because of hardware that reacts badly to the probing, or hardware
201 that would be mistakenly identified, or merely
202 hardware you don't want the kernel to initialize.
203 .IP
204 The reserve boot-time argument specifies an I/O port region that
205 shouldn't be probed.
206 A device driver will not probe a reserved region,
207 unless another boot argument explicitly specifies that it do so.
208 .IP
209 For example, the boot line
210 .IP
211 .in +4n
212 .EX
213 reserve=0x300,32 blah=0x300
214 .EE
215 .in
216 .IP
217 keeps all device drivers except the driver for 'blah' from probing
218 0x300\-0x31f.
219 .TP
220 .B "'panic=N'"
221 By default, the kernel will not reboot after a panic, but this option
222 will cause a kernel reboot after N seconds (if N is greater than zero).
223 This panic timeout can also be set by
224 .IP
225 .in +4n
226 .EX
227 echo N > /proc/sys/kernel/panic
228 .EE
229 .in
230 .TP
231 .B "'reboot=[warm|cold][,[bios|hard]]'"
232 Since Linux 2.0.22, a reboot is by default a cold reboot.
233 One asks for the old default with 'reboot=warm'.
234 (A cold reboot may be required to reset certain hardware,
235 but might destroy not yet written data in a disk cache.
236 A warm reboot may be faster.)
237 By default, a reboot is hard, by asking the keyboard controller
238 to pulse the reset line low, but there is at least one type
239 of motherboard where that doesn't work.
240 The option 'reboot=bios' will
241 instead jump through the BIOS.
242 .TP
243 .B 'nosmp'
244 .TQ
245 .B 'maxcpus=N'
246 (Only when __SMP__ is defined.)
247 A command-line option of 'nosmp' or 'maxcpus=0'
248 will disable SMP activation entirely;
249 an option 'maxcpus=N' limits
250 the maximum number of CPUs activated in SMP mode to N.
251 .SS Boot arguments for use by kernel developers
252 .TP
253 .B "'debug'"
254 Kernel messages are handed off to a daemon (e.g.,
255 .BR klogd (8)
256 or similar) so that they may be logged to disk.
257 Messages with a priority above
258 .I console_loglevel
259 are also printed on the console.
260 (For a discussion of log levels, see
261 .BR syslog (2).)
262 By default,
263 .I console_loglevel
264 is set to log messages at levels higher than
265 .BR KERN_DEBUG .
266 This boot argument will cause the kernel to also
267 print messages logged at level
268 .BR KERN_DEBUG .
269 The console loglevel can also be set on a booted system via the
270 .I /proc/sys/kernel/printk
271 file (described in
272 .BR syslog (2)),
273 the
274 .BR syslog (2)
275 .B SYSLOG_ACTION_CONSOLE_LEVEL
276 operation, or
277 .BR dmesg (8).
278 .TP
279 .B "'profile=N'"
280 It is possible to enable a kernel profiling function,
281 if one wishes to find out where the kernel is spending its CPU cycles.
282 Profiling is enabled by setting the variable
283 .I prof_shift
284 to a nonzero value.
285 This is done either by specifying
286 .B CONFIG_PROFILE
287 at compile time, or by giving the 'profile=' option.
288 Now the value that
289 .I prof_shift
290 gets will be N, when given, or
291 .BR CONFIG_PROFILE_SHIFT ,
292 when that is given, or 2, the default.
293 The significance of this variable is that it
294 gives the granularity of the profiling: each clock tick, if the
295 system was executing kernel code, a counter is incremented:
296 .IP
297 .in +4n
298 .EX
299 profile[address >> prof_shift]++;
300 .EE
301 .in
302 .IP
303 The raw profiling information can be read from
304 .IR /proc/profile .
305 Probably you'll want to use a tool such as readprofile.c to digest it.
306 Writing to
307 .I /proc/profile
308 will clear the counters.
309 .SS Boot arguments for ramdisk use
310 (Only if the kernel was compiled with
311 .BR CONFIG_BLK_DEV_RAM .)
312 In general it is a bad idea to use a ramdisk under Linux\[em]the
313 system will use available memory more efficiently itself.
314 But while booting,
315 it is often useful to load the floppy contents into a
316 ramdisk.
317 One might also have a system in which first
318 some modules (for filesystem or hardware) must be loaded
319 before the main disk can be accessed.
320 .IP
321 In Linux 1.3.48, ramdisk handling was changed drastically.
322 Earlier, the memory was allocated statically, and there was
323 a 'ramdisk=N' parameter to tell its size.
324 (This could also be set in the kernel image at compile time.)
325 These days ram disks use the buffer cache, and grow dynamically.
326 For a lot of information on the current ramdisk
327 setup, see the kernel source file
328 .IR Documentation/blockdev/ramdisk.rst .
329 .IP
330 There are four parameters, two boolean and two integral.
331 .TP
332 .B "'load_ramdisk=N'"
333 If N=1, do load a ramdisk.
334 If N=0, do not load a ramdisk.
335 (This is the default.)
336 .TP
337 .B "'prompt_ramdisk=N'"
338 If N=1, do prompt for insertion of the floppy.
339 (This is the default.)
340 If N=0, do not prompt.
341 (Thus, this parameter is never needed.)
342 .TP
343 .BR 'ramdisk_size=N' " or (obsolete) " 'ramdisk=N'
344 Set the maximal size of the ramdisk(s) to N kB.
345 The default is 4096 (4\ MB).
346 .TP
347 .B "'ramdisk_start=N'"
348 Sets the starting block number (the offset on the floppy where
349 the ramdisk starts) to N.
350 This is needed in case the ramdisk follows a kernel image.
351 .TP
352 .B "'noinitrd'"
353 (Only if the kernel was compiled with
354 .B CONFIG_BLK_DEV_RAM
355 and
356 .BR CONFIG_BLK_DEV_INITRD .)
357 These days it is possible to compile the kernel to use initrd.
358 When this feature is enabled,
359 the boot process will load the kernel and an initial ramdisk;
360 then the kernel converts initrd into a "normal" ramdisk,
361 which is mounted read-write as root device;
362 then
363 .I /linuxrc
364 is executed;
365 afterward the "real" root filesystem is mounted,
366 and the initrd filesystem is moved over to
367 .IR /initrd ;
368 finally,
369 the usual boot sequence
370 (e.g., invocation of
371 .IR /sbin/init )
372 is performed.
373 .IP
374 For a detailed description of the initrd feature,
375 see the kernel source file
376 .IR Documentation/admin\-guide/initrd.rst .
377 .IP
378 The 'noinitrd' option tells the kernel that although it was compiled for
379 operation with initrd, it should not go through the above steps, but
380 leave the initrd data under
381 .IR /dev/initrd .
382 (This device can be used only once: the data is freed as soon as
383 the last process that used it has closed
384 .IR /dev/initrd .)
385 .SS Boot arguments for SCSI devices
386 General notation for this section:
387 .P
388 .I iobase
389 -- the first I/O port that the SCSI host occupies.
390 These are specified in hexadecimal notation,
391 and usually lie in the range from 0x200 to 0x3ff.
392 .P
393 .I irq
394 -- the hardware interrupt that the card is configured to use.
395 Valid values will be dependent on the card in question, but will
396 usually be 5, 7, 9, 10, 11, 12, and 15.
397 The other values are usually
398 used for common peripherals like IDE hard disks, floppies, serial
399 ports, and so on.
400 .P
401 .I scsi\-id
402 -- the ID that the host adapter uses to identify itself on the
403 SCSI bus.
404 Only some host adapters allow you to change this value, as
405 most have it permanently specified internally.
406 The usual default value
407 is 7, but the Seagate and Future Domain TMC-950 boards use 6.
408 .P
409 .I parity
410 -- whether the SCSI host adapter expects the attached devices
411 to supply a parity value with all information exchanges.
412 Specifying a one indicates parity checking is enabled,
413 and a zero disables parity checking.
414 Again, not all adapters will support selection of parity
415 behavior as a boot argument.
416 .TP
417 .B "'max_scsi_luns=...'"
418 A SCSI device can have a number of 'subdevices' contained within
419 itself.
420 The most common example is one of the new SCSI CD-ROMs that
421 handle more than one disk at a time.
422 Each CD is addressed as a
423 \&'Logical Unit Number' (LUN) of that particular device.
424 But most
425 devices, such as hard disks, tape drives, and such are only one device,
426 and will be assigned to LUN zero.
427 .IP
428 Some poorly designed SCSI devices cannot handle being probed for
429 LUNs not equal to zero.
430 Therefore, if the compile-time flag
431 .B CONFIG_SCSI_MULTI_LUN
432 is not set, newer kernels will by default probe only LUN zero.
433 .IP
434 To specify the number of probed LUNs at boot, one enters
435 \&'max_scsi_luns=n' as a boot arg, where n is a number between one and
436 eight.
437 To avoid problems as described above, one would use n=1 to
438 avoid upsetting such broken devices.
439 .TP
440 .B "SCSI tape configuration"
441 Some boot time configuration of the SCSI tape driver can be achieved
442 by using the following:
443 .IP
444 .in +4n
445 .EX
446 .BI st= buf_size[,write_threshold[,max_bufs]]
447 .EE
448 .in
449 .IP
450 The first two numbers are specified in units of kB.
451 The default
452 .I buf_size
453 is 32k\ B, and the maximum size that can be specified is a
454 ridiculous 16384\ kB.
455 The
456 .I write_threshold
457 is the value at which the buffer is committed to tape, with a
458 default value of 30\ kB.
459 The maximum number of buffers varies
460 with the number of drives detected, and has a default of two.
461 An example usage would be:
462 .IP
463 .in +4n
464 .EX
465 st=32,30,2
466 .EE
467 .in
468 .IP
469 Full details can be found in the file
470 .IR Documentation/scsi/st.rst .
471 .SS Hard disks
472 .TP
473 .B "IDE Disk/CD-ROM Driver Parameters"
474 The IDE driver accepts a number of parameters, which range from disk
475 geometry specifications, to support for broken controller chips.
476 Drive-specific options are specified by using 'hdX=' with X in 'a'\[en]'h'.
477 .IP
478 Non-drive-specific options are specified with the prefix 'hd='.
479 Note that using a drive-specific prefix for a non-drive-specific option
480 will still work, and the option will just be applied as expected.
481 .IP
482 Also note that 'hd=' can be used to refer to the next unspecified
483 drive in the (a, ..., h) sequence.
484 For the following discussions,
485 the 'hd=' option will be cited for brevity.
486 .IP
487 Support for IDE was removed in Linux 5.14.
488 .TP
489 .B "The 'hd=cyls,heads,sects[,wpcom[,irq]]' options"
490 These options are used to specify the physical geometry of the disk.
491 Only the first three values are required.
492 The cylinder/head/sectors
493 values will be those used by fdisk.
494 The write precompensation value
495 is ignored for IDE disks.
496 The IRQ value specified will be the IRQ
497 used for the interface that the drive resides on, and is not really a
498 drive-specific parameter.
499 .TP
500 .B "The 'hd=serialize' option"
501 The dual IDE interface CMD-640 chip is broken as designed such that
502 when drives on the secondary interface are used at the same time as
503 drives on the primary interface, it will corrupt your data.
504 Using this
505 option tells the driver to make sure that both interfaces are never
506 used at the same time.
507 .TP
508 .B "The 'hd=noprobe' option"
509 Do not probe for this drive.
510 For example,
511 .IP
512 .in +4n
513 .EX
514 hdb=noprobe hdb=1166,7,17
515 .EE
516 .in
517 .IP
518 would disable the probe, but still specify the drive geometry so
519 that it would be registered as a valid block device, and hence
520 usable.
521 .TP
522 .B "The 'hd=nowerr' option"
523 Some drives apparently have the
524 .B WRERR_STAT
525 bit stuck on permanently.
526 This enables a work-around for these broken devices.
527 .TP
528 .B "The 'hd=cdrom' option"
529 This tells the IDE driver that there is an ATAPI compatible CD-ROM
530 attached in place of a normal IDE hard disk.
531 In most cases the CD-ROM
532 is identified automatically, but if it isn't then this may help.
533 .TP
534 .B "Standard ST-506 Disk Driver Options ('hd=')"
535 The standard disk driver can accept geometry arguments for the disks
536 similar to the IDE driver.
537 Note however that it expects only three values (C/H/S);
538 any more or any less and it will silently ignore you.
539 Also,
540 it accepts only 'hd=' as an argument,
541 that is,
542 \&'hda=' and so on are not valid here.
543 The format is as follows:
544 .IP
545 .in +4n
546 .EX
547 hd=cyls,heads,sects
548 .EE
549 .in
550 .IP
551 If there are two disks installed,
552 the above is repeated with the geometry parameters of the second disk.
553 .SS Ethernet devices
554 Different drivers make use of different parameters,
555 but they all at least share having
556 an IRQ, an I/O port base value, and a name.
557 In its most generic form,
558 it looks something like this:
559 .P
560 .in +4n
561 .EX
562 ether=irq,iobase[,param_1[,...param_8]],name
563 .EE
564 .in
565 .P
566 The first nonnumeric argument is taken as the name.
567 The param_n values (if applicable) usually have different meanings for each
568 different card/driver.
569 Typical param_n values are used to specify
570 things like shared memory address, interface selection, DMA channel
571 and the like.
572 .P
573 The most common use of this parameter is to force probing for a second
574 ethercard, as the default is to probe only for one.
575 This can be accomplished with a simple:
576 .P
577 .in +4n
578 .EX
579 ether=0,0,eth1
580 .EE
581 .in
582 .P
583 Note that the values of zero for the IRQ and I/O base in the above
584 example tell the driver(s) to autoprobe.
585 .P
586 The Ethernet-HowTo has extensive documentation on using multiple
587 cards and on the card/driver-specific implementation
588 of the param_n values where used.
589 Interested readers should refer to
590 the section in that document on their particular card.
591 .SS The floppy disk driver
592 There are many floppy driver options, and they are all listed in
593 .IR Documentation/blockdev/floppy.rst .
594 See that file for the details.
595 .SS The sound driver
596 The sound driver can also accept boot arguments to override the compiled-in
597 values.
598 This is not recommended, as it is rather complex.
599 It is described in the Linux kernel source file
600 .I Documentation/sound/oss/README.OSS
601 .RI ( drivers/sound/Readme.linux
602 in older kernel versions).
603 It accepts
604 a boot argument of the form:
605 .P
606 .in +4n
607 .EX
608 sound=device1[,device2[,device3...[,device10]]]
609 .EE
610 .in
611 .P
612 where each deviceN value is of the following format 0xTaaaId and the
613 bytes are used as follows:
614 .P
615 T \- device type: 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16,
616 7=SB16-MPU401
617 .P
618 aaa \- I/O address in hex.
619 .P
620 I \- interrupt line in hex (i.e., 10=a, 11=b, ...)
621 .P
622 d \- DMA channel.
623 .P
624 As you can see, it gets pretty messy, and you are better off to compile
625 in your own personal values as recommended.
626 Using a boot argument of
627 \&'sound=0' will disable the sound driver entirely.
628 .SS The line printer driver
629 .TP
630 .B "'lp='"
631 .br
632 Syntax:
633 .IP
634 .in +4n
635 .EX
636 lp=0
637 lp=auto
638 lp=reset
639 lp=port[,port...]
640 .EE
641 .in
642 .IP
643 You can tell the printer driver what ports to use and what ports not
644 to use.
645 The latter comes in handy if you don't want the printer driver
646 to claim all available parallel ports, so that other drivers
647 (e.g., PLIP, PPA) can use them instead.
648 .IP
649 The format of the argument is multiple port names.
650 For example,
651 lp=none,parport0 would use the first parallel port for lp1, and
652 disable lp0.
653 To disable the printer driver entirely, one can use
654 lp=0.
655 .\" .SH AUTHORS
656 .\" Linus Torvalds (and many others)
657 .SH SEE ALSO
658 .BR klogd (8),
659 .BR mount (8)
660 .P
661 For up-to-date information, see the kernel source file
662 .IR Documentation/admin\-guide/kernel\-parameters.txt .