info > BOOTPARAM

BOOTPARAM(7) Linux Programmer's Manual BOOTPARAM(7)

πŸ“› NAME

bootparam - introduction to boot time parameters of the Linux kernel

πŸš€ Quick Reference

Use Case Command Description
Set root device root=/dev/sda1 Specify which device to use as root filesystem
Mount root as read-only ro Mount root filesystem read-only for fsck
Mount root as read-write rw Mount root filesystem read/write (default)
Set root filesystem type rootfstype=ext3 Force mount root as specific filesystem type
Single user mode single Boot to single user mode (passed to init)
Disable SMP nosmp or maxcpus=0 Disable symmetric multiprocessing
Limit number of CPUs maxcpus=2 Activate at most N CPUs in SMP mode
Set panic timeout panic=10 Reboot N seconds after kernel panic
Reserve I/O port region reserve=0x300,32 Protect I/O ports from probing
Set init process init=/bin/sh Override the initial command executed by kernel
Enable debug messages debug Print KERN_DEBUG messages to console
Enable kernel profiling profile=2 Set profiling granularity (shift value)
Load ramdisk load_ramdisk=1 Load a ramdisk during boot
Set ramdisk size ramdisk_size=8192 Set maximal ramdisk size (in kB)
Prompt for floppy prompt_ramdisk=1 Prompt for floppy insertion (default)
Disable initrd noinitrd Skip initrd processing, keep data under /dev/initrd
Set number of SCSI LUNs to probe max_scsi_luns=8 Limit LUN probing to avoid broken devices
Configure SCSI tape buffer st=32,30,2 buf_size, write_threshold, max_bufs (in kB)
IDE disk geometry hd=cyls,heads,sects Specify physical disk geometry (C/H/S)
Serialize IDE accesses hd=serialize Avoid simultaneous access to both IDE interfaces
Disable IDE probe hdb=noprobe Do not probe for a specific drive
Ignore WRERR_STAT bit hd=nowerr Workaround for drives with stuck WRERR_STAT bit
Force ATAPI CD-ROM detection hd=cdrom Tell IDE driver the device is an ATAPI CD-ROM
Second Ethernet card probe ether=0,0,eth1 Force probing for a second Ethernet interface
Disable sound driver sound=0 Disable the sound driver entirely
Configure printer ports lp=auto or lp=none,parport0 Specify parallel ports for printer driver
Disable printer driver lp=0 Disable the line printer driver

πŸ“– DESCRIPTION

The Linux kernel accepts certain 'command-line options' or 'boot time parameters' at the moment it is started. In general, this is used to supply the kernel with information about hardware parameters that the kernel would not be able to determine on its own, or to avoid/override the values that the kernel would otherwise detect.

When the kernel is booted directly by the BIOS, you have no opportunity to specify any parameters. So, in order to take advantage of this possibility you have to use a boot loader that is able to pass parameters, such as GRUB.

πŸ—‚οΈ The argument list

The kernel command line is parsed into a list of strings (boot arguments) separated by spaces. Most of the boot arguments have the form:

name[=value_1][,value_2]...[,value_10]

where 'name' is a unique keyword that is used to identify what part of the kernel the associated values (if any) are to be given to. Note the limit of 10 is real, as the present code handles only 10 comma separated parameters per keyword. (However, you can reuse the same keyword with up to an additional 10 parameters in unusually complicated situations, assuming the setup function supports it.)

Most of the sorting is coded in the kernel source file init/main.c. First, the kernel checks to see if the argument is any of the special arguments 'root=', 'nfsroot=', 'nfsaddrs=', 'ro', 'rw', 'debug' or 'init'. The meaning of these special arguments is described below.

Then it walks a list of setup functions to see if the specified argument string (such as 'foo') has been associated with a setup function ('foo_setup()') for a particular device or part of the kernel. If you passed the kernel the line foo=3,4,5,6 then the kernel would search the bootsetups array to see if 'foo' was registered. If it was, then it would call the setup function associated with 'foo' (foo_setup()) and hand it the arguments 3, 4, 5, and 6 as given on the kernel command line.

Anything of the form 'foo=bar' that is not accepted as a setup function as described above is then interpreted as an environment variable to be set. A (useless?) example would be to use 'TERM=vt100' as a boot argument.

Any remaining arguments that were not picked up by the kernel and were not interpreted as environment variables are then passed onto PID 1, which is usually the init(1) program. The most common argument that is passed to the init process is the word 'single' which instructs it to boot the computer in single user mode, and not launch all the usual daemons. Check the manual page for the version of init(1) installed on your system to see what arguments it accepts.

βš™οΈ General non‑device‑specific boot arguments

πŸ› οΈ Boot arguments for use by kernel developers

πŸ’Ύ Boot arguments for ramdisk use

(Only if the kernel was compiled with CONFIG_BLK_DEV_RAM.) In general it is a bad idea to use a ramdisk under Linuxβ€”the system will use available memory more efficiently itself. But while booting, it is often useful to load the floppy contents into a ramdisk. One might also have a system in which first some modules (for filesystem or hardware) must be loaded before the main disk can be accessed.

In Linux 1.3.48, ramdisk handling was changed drastically. Earlier, the memory was allocated statically, and there was a 'ramdisk=N' parameter to tell its size. (This could also be set in the kernel image at compile time.) These days ram disks use the buffer cache, and grow dynamically. For a lot of information on the current ramdisk setup, see the kernel source file Documentation/blockdev/ramdisk.txt (Documentation/ramdisk.txt in older kernels).

There are four parameters, two boolean and two integral.

πŸ–₯️ Boot arguments for SCSI devices

General notation for this section:

SCSI tape configuration

Some boot time configuration of the SCSI tape driver can be achieved by using the following:

st=buf_size[,write_threshold[,max_bufs]]

The first two numbers are specified in units of kB. The default buf_size is 32k B, and the maximum size that can be specified is a ridiculous 16384 kB. The write_threshold is the value at which the buffer is committed to tape, with a default value of 30 kB. The maximum number of buffers varies with the number of drives detected, and has a default of two. An example usage would be:

st=32,30,2

Full details can be found in the file Documentation/scsi/st.txt (or drivers/scsi/README.st for older kernels) in the Linux kernel source.

πŸ’½ Hard disks

IDE Disk/CD-ROM Driver Parameters

The IDE driver accepts a number of parameters, which range from disk geometry specifications, to support for broken controller chips. Drive-specific options are specified by using 'hdX=' with X in 'a'–'h'. Non-drive-specific options are specified with the prefix 'hd='. Note that using a drive-specific prefix for a non-drive-specific option will still work, and the option will just be applied as expected. Also note that 'hd=' can be used to refer to the next unspecified drive in the (a, ..., h) sequence. For the following discussions, the 'hd=' option will be cited for brevity. See the file Documentation/ide/ide.txt (or Documentation/ide.txt in older kernels, or drivers/block/README.ide in ancient kernels) in the Linux kernel source for more details.

Standard ST-506 Disk Driver Options ('hd=')

The standard disk driver can accept geometry arguments for the disks similar to the IDE driver. Note however that it expects only three values (C/H/S); any more or any less and it will silently ignore you. Also, it accepts only 'hd=' as an argument, that is, 'hda=' and so on are not valid here. The format is as follows:

hd=cyls,heads,sects

If there are two disks installed, the above is repeated with the geometry parameters of the second disk.

🌐 Ethernet devices

Different drivers make use of different parameters, but they all at least share having an IRQ, an I/O port base value, and a name. In its most generic form, it looks something like this:

ether=irq,iobase[,param_1[,...param_8]],name

The first nonnumeric argument is taken as the name. The param_n values (if applicable) usually have different meanings for each different card/driver. Typical param_n values are used to specify things like shared memory address, interface selection, DMA channel and the like. The most common use of this parameter is to force probing for a second ethercard, as the default is to probe only for one. This can be accomplished with a simple:

ether=0,0,eth1

Note that the values of zero for the IRQ and I/O base in the above example tell the driver(s) to autoprobe. The Ethernet-HowTo has extensive documentation on using multiple cards and on the card/driver-specific implementation of the param_n values where used. Interested readers should refer to the section in that document on their particular card.

πŸ’Ώ The floppy disk driver

There are many floppy driver options, and they are all listed in Documentation/blockdev/floppy.txt (or Documentation/floppy.txt in older kernels, or drivers/block/README.fd for ancient kernels) in the Linux kernel source. See that file for the details.

πŸ”Š The sound driver

The sound driver can also accept boot arguments to override the compiled-in values. This is not recommended, as it is rather complex. It is described in the Linux kernel source file Documentation/sound/oss/README.OSS (drivers/sound/Readme.linux in older kernel versions). It accepts a boot argument of the form:

sound=device1[,device2[,device3...[,device10]]]

where each deviceN value is of the following format 0xTaaaId and the bytes are used as follows:

As you can see, it gets pretty messy, and you are better off to compile in your own personal values as recommended. Using a boot argument of 'sound=0' will disable the sound driver entirely.

πŸ–¨οΈ The line printer driver

πŸ“š SEE ALSO

klogd(8), mount(8)

For up-to-date information, see the kernel source file Documentation/admin-guide/kernel-parameters.txt.

πŸ“œ COLOPHON

This page is part of release 5.10 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.


Linux 2017-09-15 BOOTPARAM(7)

BOOTPARAM
πŸ“› NAME πŸš€ Quick Reference πŸ“– DESCRIPTION
πŸ—‚οΈ The argument list βš™οΈ General non‑device‑specific boot arguments πŸ› οΈ Boot arguments for use by kernel developers πŸ’Ύ Boot arguments for ramdisk use πŸ–₯️ Boot arguments for SCSI devices πŸ’½ Hard disks 🌐 Ethernet devices πŸ’Ώ The floppy disk driver πŸ”Š The sound driver πŸ–¨οΈ The line printer driver
πŸ“š SEE ALSO πŸ“œ COLOPHON

Generated by phpman v4.9.26-1-g511901d Author: Che Dong Under GNU General Public License
2026-08-09 09:07 @2600:1f28:365:80b0:50b3:453e:ff52:20f7
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format