When you boot your system by using loadlin, you can specify several parameters that control the boot process. Such parameters are sometimes needed to take advantage of unusual hardware devices, large amounts of RAM (more than 128 MB), and so on. Similarly, when you boot by using lilo, you can also boot parameters to control the boot process; you can specify lilo’s boot parameters by using linuxconf or by editing lilo’s configuration file. You can also specify boot parameters to lilo by typing them in response to lilo’s prompt.
Boot parameters are specified using a two-part directive that includes:
No spaces may appear in the directive. As an example, the following directive specifies the identity of the Linux root partition:
root=/dev/hda1
You can specify multiple directives by separating them with a space. For example, the following specifies the identity of the Linux root partition and specifies that the root partition is initially mounted read-only, so that a thorough check of its filesystem can be performed:
root=/dev/hda1 ro
Most directives are interpreted by the kernel, though lilo is also capable of processing directives. If you specify a directive that neither the kernel nor lilo understands (assuming you’re using lilo), a directive that includes an equals sign is passed to the init process as an environment variable. You’ve learned about environment variables in Chapter 13. A non-kernel directive that doesn’t include an equals sign is passed to the init process. An example of this usage is specifying the directive single, which causes init to start your system in single-user mode:
root=/dev/hda1 ro single
This directive is especially useful when booting your system using lilo; by specifying the single directive in response to lilo’s command prompt, you can boot your system in single-user mode.
Table 4-2 describes some of the most popular and useful boot arguments. These arguments apply to your system as a whole; in subsequent sections you’ll learn about other boot arguments that apply to specific devices or functions. In addition to boot arguments previously introduced, the table describes the reserve argument, which is helpful in avoided system memory conflicts.
Table D-2. Selected General Boot Arguments
Argument |
Description and options |
---|---|
init=
|
Specifies arguments passed by the kernel to the init process. |
mem=
|
Specifies the amount of physical memory available to Linux; lets you instruct Linux to avoid high memory areas used by some systems for BIOS or caching. You can specify the amount as a hexadecimal number, or as a decimal number followed by k or M, denoting kilobytes or megabytes, respectively. |
reserve=
|
Specifies I/O ports that must not be probed. The port number is specified by using a hexadecimal number and the range is specified by using a decimal number. For example, |
ro
|
Initially mount the root filesystem in read-only mode, so that a more effective filesystem check can be done. |
root=
|
Identifies the root filesystem: • • • |
rw
|
Initially mount the root filesystem in read-write mode; do not perform a filesystem check. |
vga=
|
Specifies the default display mode set before booting. Specifying Note: This argument is interpreted by lilo and will have no effect if another loader is used. |
Table 4-3 describes several boot arguments used in working with RAM disks. You won’t likely need to specify any of these; but knowing about them may help you understand boot specifications written by others, including those used by Debian GNU/Linux.
Table D-3. Selected RAM Disk Arguments
Argument |
Description and options |
---|---|
load_ramdisk=
|
Specifies that a ramdisk is not to be loaded (0) or is to be loaded (1). |
prompt_ramdisk=
|
Specifies whether to provide a prompt instructing the user to insert a floppy containing a ramdisk (1) or provide no such prompt (0). |
ramdisk_size=
|
Specifies the amount of RAM to be allocated to a ramdisk. If not specified, the default value is 4 MB. |
ramdisk_start=
|
Specifies the offset (in disk blocks from the start of the boot media) of the ramdisk data; lets a kernel and ramdisk data occupy the same floppy disk. |
Table 4-4 describes the most often used boot arguments related to SCSI host adapters. Table 4-5 describes the options used by the SCSI host adapter boot arguments and other boot arguments.
Table D-4. Selected SCSI Host Adapter Arguments
For example, from Table 4-4 you can learn that Adaptec aha154x SCSI host adapters use a boot argument having the form:
iobase[,buson,busoff[,dmaspeed]]
Table 4-5 helps you understand the form of the iobase
option and the other italicized options. The iobase
option, for example, lets you specify the I/O port associated with the SCSI host adapter. Don’t include the square brackets in your boot argument; they merely indicate which options must be present. For example, you can specify a boot argument for an Adaptec aha154x SCSI host adapter by writing only an iobase
option; the remaining options are optional. However, as indicated by the square brackets, if you include a buson
option, you must include a busoff
option. Similarly, to include the dmaspeed
option, you must include each of the other options. Here’s an example of a complete boot argument:
aha1542=0x300,11,4
Table D-5. Selected Boot Prompt Options
Option |
Description and options |
---|---|
|
The interval (number of microseconds) during which the device will relinquish the ISA bus, specified as a decimal integer; for example, |
|
The interval (number of microseconds) during which the device will dominate the ISA bus, specified as a decimal integer; for example, |
|
The I/O port used for control, specified as a hexadecimal number; for example, |
|
The geometry of the storage device, specified as three integers denoting the number of cylinders, heads, and sectors, respectively. |
|
A SCSI device with which the host adapter communicates, specified as a decimal integer; for example, |
|
The DMA (direct memory access) channel by used by the device, specified as a decimal integer; for example, |
|
The rate (in MB/sec.) at which DMA transfers are performed, specified as a decimal integer; for example, |
|
Specifies whether extended translation for large disks is enabled ( |
|
Specifying the value |
|
Specifies whether the driver should reset the SCSI bus when setting up the host adapter at boot ( |
|
An I/O port, specified as a hexadecimal number; for example, |
|
A hardware interrupt number, specified as a decimal integer; for example, |
|
Specifies whether a Pro Audio Spectrum card is used ( |
|
The base address of a memory region used for memory-mapped I/O, specified as a hexadecimal number; for example, |
|
Specifies whether the SCSI host adapter uses parity ( |
|
Specifies whether |
|
Specifies whether the SCSI host adapter is allowed to disconnect and reconnect ( |
|
The ID by which the SCSI host adapter identifies itself, specified as a decimal integer; for example, |
To determine a proper value for options described in Table 4-5, you must often know something about the hardware structure of your system. The procedures described in Chapter 2 will help you.
Table 4-6 describes the most commonly used boot arguments associated with IDE hard rives and CD-ROM drives. Refer to Table 4-7 to determine the form of the italicized options.
Table D-6. Selected IDE Hard Drive Arguments
|
Description and Options |
---|---|
ide0=
|
IDE hard drive or CD-ROM: • • • • • • |
hd
x
=
|
IDE hard drive or CD-ROM ( • • • • • • |
ide
x
=
|
IDE hard drive or CD-ROM ( • • • • • |
• • |
Table 4-7 describes the most common boot arguments for non-IDE CD-ROM drives. Refer to Table 4-5 to determine the form of the italicized options.
Table D-7. Selected CD-ROM Arguments
A few systems require special boot arguments to make best use of their floppy drives. Table 4-8 describes the most common boot arguments related to floppy drives. The file README.fd in linux/drivers/block describes additional arguments. Floppy drives that are not well behaved may malfunction if you specify the daring
option, which you should use only with care.
Table D-8. Selected Floppy Disk Arguments and Options
Argument and Option |
Description |
---|---|
floppy=asus_pci
|
Specifies that only units 0 and 1 are allowed, to work around problem with BIOS of certain ASUS motherboards. |
floppy=daring
|
Specifies that the floppy controller is well behaved, allowing more efficient operation. |
floppy=0,daring
|
Specifies that the floppy controller may not be well behaved (default). |
floppy=thinkpad
|
Specifies that the system is an IBM Thinkpad. |
|
Specifies that a message should be printed when an unexpected interrupt is received. This is required by IBM L40SX laptops in certain video modes. |
Two boot arguments provide bus mouse support. The first supports the Microsoft bus mouse:
msmouse=irq
The second supports any non-Microsoft bus mouse:
bmouse=irq
Each argument accepts a single option specifying the IRQ associated with the mouse.
The Linux printer driver claims all available parallel ports. If you want to access a device other than a printer attached to a parallel port, you must instruct the printer driver to reserve only the ports associated with printers. To do so, use the lp
boot argument, which takes as its options a list of ports and IRQs use to support printers. For example, the following boot argument specifies two printers:
lp=0x3bc,0,0x378,7
The first printer is on port 0x3bc
and the second is on port 0x378
. The first printer uses a special IRQ-less mode known as polling, so its IRQ is specified as 0. The second printer uses IRQ 7.
To disable all printers, specify lp=0
.
3.147.44.182