home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeLinux in a NutshellSearch this book

4.5. Boot-time Kernel Options

The Loadlin and LILO sections of this chapter described some of the options you can specify when you boot Linux. There are many more options that can be specified. This section touches on the ways to pass options to the kernel and then describes some of the kinds of parameters you might want to use. The parameters in this section affect the kernel and therefore apply regardless of which boot loader you use.

As always with Unix systems, there are a number of choices for the boot process itself. If you are using Loadlin, you can pass parameters to the kernel on the command line or in a file.

If LILO is your boot loader, you can add to or override the parameters specified in /etc/lilo.conf during the boot process as follows:

  • If prompt is set in /etc/lilo.conf, LILO always presents the boot prompt and waits for input. At the prompt, you can choose the operating system to be booted. If you choose Linux, you also can specify parameters.

  • If prompt isn't set, when the word "LILO" appears, press Control, Shift, or Alt, and the boot prompt appears. You also can press the Scroll Lock key before LILO is printed and not have to wait poised over the keyboard for the right moment.

  • At the boot prompt, specify the system you want to boot or press Tab to get a list of the available choices. You then can enter the name of the image to boot. For example:

    LILO boot: <press Tab>
    linux   test   dos
    boot: linux

    You also can add boot command options:

    boot: linux single
  • If you don't provide any input, LILO waits the amount of time specified in the delay parameter and then boots the default operating system with the default parameters as set in /etc/lilo.conf.

Some of the boot parameters have been mentioned earlier. Many of the others are hardware-specific and are too numerous to mention here. For a complete list of parameters and a discussion of the booting process, see the BootPrompt-HOWTO. Some of the parameters not shown earlier that you might find useful are listed next; many more are covered in the HOWTO. Most of the following parameters are used to provide information or instructions for the kernel, rather than to LILO.

debug

Prints all kernel messages to the console.

hd=cylinders,heads,sectors

Specifies the hard drive geometry to the kernel. Useful if Linux has trouble recognizing the geometry of your drive, especially if it's an IDE drive with more than 1024 cylinders.

load_ramdisk=n

Tells the kernel whether to load a RAM disk image for use during Linux installation. Values of n are:

0

Don't try to load the image. This is the default.

1

Load the image from a floppy disk to the RAM disk.

mem=size

Specifies the amount of system memory installed. Useful if your BIOS reports memory only up to 64 MB and your system has more memory installed. Specify as a number with M or k (case-insensitive) appended:

mem=128M

Because mem would have to be included on the command line for every boot, it often is specified on a command line saved with lock or with append to be added to the parameters passed to the kernel.

noinitrd

When set, disables the two-stage boot and preserves the contents of /dev/initrd so the data is available after the kernel has booted. /dev/initrd can be read only once, and then its contents are returned to the system.

number

Starts Linux at the runlevel specified by number. A runlevel is an operating state that the system can be booted to, such as a multiuser system or a system configuration running the X Window System. A runlevel is generally one of the numbers from 1 to 6; the default usually is 3. The runlevels and their corresponding states are defined in the file /etc/inittab. See the manpage for /etc/inittab for more information.

ro

Mounts the root filesystem read-only. Used for doing system maintenance, such as checking the filesystem integrity, when you don't want anything written to the filesystem.

rw

Mounts the root filesystem read-write. If neither ro nor rw is specified, the default value (usually rw) stored in the kernel image is used.

single

Starts Linux in single-user mode. This option is used for system administration and recovery. It gives you a root prompt as soon as the system boots, with minimal initialization. No other logins are allowed.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.