Linux repositories inspector


Manual pages about using a GNU/Linux system


Linux kernel and C library user-space interface documentation


bootparam - introduction to boot time parameters of the Linux kernel


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.

The argument list

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.

General non-device-specific boot arguments

This sets the NFS root name to the given string. If this string does not begin with ’/’ or ’,’ or a digit, then it is prefixed by ’/tftpboot/’. This root name is used in case of a net boot.
The root device can be specified symbolically or numerically. A symbolic specification has the form /dev/XXYN, where XX designates the device type (e.g., ’hd’ for ST-506 compatible hard disk, with Y in ’a’-’d’; ’sd’ for SCSI compatible disk, with Y in ’a’-’e’), Y the driver letter or number, and N the number (in decimal) of the partition on this device.
Note that this has nothing to do with the designation of these devices on your filesystem. The ’/dev/’ part is purely conventional.
The more awkward and less portable numeric specification of the above possible root devices in major/minor format is also accepted. (For example, /dev/sda3 is major 8, minor 3, so you could use ’root=0x803’ as an alternative.)
’ro’ and ’rw’
The ’ro’ option tells the kernel to mount the root filesystem as ’read-only’ so that filesystem consistency check programs (fsck) can do their work on a quiescent filesystem. No processes can write to files on the filesystem in question until it is ’remounted’ as read/write capable, for example, by ’mount -w -n -o remount /’. (See also mount(8).)
The ’rw’ option tells the kernel to mount the root filesystem read/write. This is the default.
The reserve boot-time argument specifies an I/O port region that shouldn’t be probed. A device driver will not probe a reserved region, unless another boot argument explicitly specifies that it do so.
For example, the boot line
reserve=0x300,32 blah=0x300
keeps all device drivers except the driver for ’blah’ from probing 0x300-0x31f.
echo N > /proc/sys/kernel/panic
Since Linux 2.0.22, a reboot is by default a cold reboot. One asks for the old default with ’reboot=warm’. (A cold reboot may be required to reset certain hardware, but might destroy not yet written data in a disk cache. A warm reboot may be faster.) By default, a reboot is hard, by asking the keyboard controller to pulse the reset line low, but there is at least one type of motherboard where that doesn’t work. The option ’reboot=bios’ will instead jump through the BIOS.
’nosmp’ and ’maxcpus=N’
(Only when __SMP__ is defined.) A command-line option of ’nosmp’ or ’maxcpus=0’ will disable SMP activation entirely; an option ’maxcpus=N’ limits the maximum number of CPUs activated in SMP mode to N.

Boot arguments for use by kernel developers

profile[address >> prof_shift]++;
The raw profiling information can be read from /proc/profile. Probably you’ll want to use a tool such as readprofile.c to digest it. Writing to /proc/profile will clear the counters.

Boot arguments for ramdisk use

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.
’ramdisk_size=N’ or (obsolete) ’ramdisk=N’

Boot arguments for SCSI devices

General notation for this section:
A SCSI device can have a number of ’subdevices’ contained within itself. The most common example is one of the new SCSI CD-ROMs that handle more than one disk at a time. Each CD is addressed as a ’Logical Unit Number’ (LUN) of that particular device. But most devices, such as hard disks, tape drives and such are only one device, and will be assigned to LUN zero.
To specify the number of probed LUNs at boot, one enters ’max_scsi_luns=n’ as a boot arg, where n is a number between one and eight. To avoid problems as described above, one would use n=1 to avoid upsetting such broken devices.
SCSI tape configuration

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.
The ’hd=cyls,heads,sects[,wpcom[,irq]]’ options
The ’hd=serialize’ option
The ’hd=noprobe’ option
Do not probe for this drive. For example,
hdb=noprobe hdb=1166,7,17
The ’hd=nowerr’ option
The ’hd=cdrom’ option
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:

Ethernet devices


The floppy disk driver


The sound driver

aaa - I/O address in hex.
d - DMA channel.
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

’lp=’ Syntax:
lp=0 lp=auto lp=reset lp=port[,port...]
You can tell the printer driver what ports to use and what ports not to use. The latter comes in handy if you don’t want the printer driver to claim all available parallel ports, so that other drivers (e.g., PLIP, PPA) can use them instead.


klogd(8), mount(8)
⇧ Top