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

Book HomeRunning LinuxSearch this book

Appendix G. LILO Boot Options

The most popular way to boot Linux on Intel platforms is the LInux LOader, LILO, whose configuration and use are described in the sectionx "Section 5.2.2, "Using LILO"" in Chapter 5, "Essential System Management". This appendix summarizes the options you can specify in the /etc/lilo.conf file and on the /sbin/lilo command line.

The configuration file starts with a section of global options, described in the next section. Global options are those that apply to every system boot, regardless of what operating system you are booting.

Following the global section, there is one section of options for each Linux kernel. While the variety of kernel options--many of them hardware specific--make it unfeasible to list them all here, the section "Section G.3, "Kernel Options "" later in this chapter describes the most common ones.

Finally, the configuration file contains a section for each non-Linux operating system that you want LILO to be able to boot. Each of those sections is referred to as an image section, because each boots a different kernel image (shorthand for a binary file containing a kernel) or another operating system. Each Linux image section begins with an image= line. Options found in these sections are described in the section "Section G.2, "Image Options "" later in this chapter.

G.1. Global Options

In addition to the options listed here, the kernel options append, read-only, read-write, root, and vga (described in the section "Kernel options" later) can also be set as global options:

backup=backup-file

Copies the original boot sector to backup-file instead of to the file /boot/boot.nnnn, where nnnn is a number that depends on the disk device type.

boot=boot-device

Sets the name of the device that contains the boot sector. boot defaults to the device currently mounted as the root, such as /dev/hda2. Specifying a device, such as /dev/hda (without a number), indicates that LILO should be installed in the master boot record; the alternative is to set it up on a particular partition, such as /dev/hda2.

compact

Merges read requests for adjacent disk sectors to speed up booting. Use of compact is particularly recommended when booting from a floppy disk. Use of compact may conflict with linear.

default=name

Uses the image name as the default boot image. If default is omitted, the first image specified in the configuration file is used.

delay=tsecs

Specifies, in tenths of a second, how long the boot loader should wait before booting the default image. If serial is set, delay is set to 20 at a minimum. The default is not to wait.

disk=device-name

Defines parameters for the disk specified by device-name if LILO can't figure them out. Normally, LILO can determine the disk parameters itself and this option isn't needed. When disk is specified, it is followed by one or more parameter lines:

disk=/dev/sda
  bios = 0x80  # First disk is usually 0x80, second is usually 0x81
  sectors= ...
  heads= ...
Note that this option is not the same as the disk geometry parameters you can specify with the hd boot command-line option. With disk, the information is given to LILO; with hd, it is passed to the kernel. The parameters that can be specified with disk are briefly listed here. They are described in detail in the LILO User's Guide which comes with the LILO distribution.

bios=bios-device-code

Specifies the number the BIOS uses to refer to the device. See the previous example.

cylinders=cylinders

Specifies the number of cylinders on the disk.

heads=heads

Specifies the number of heads on the disk.

inaccessible

Tells LILO that the BIOS can't read the disk; this option is used to prevent the system from becoming unbootable if LILO thinks the BIOS can read it.

partition=partition-device

Starts a new section for a partition. The section contains one variable, start=partition-offset that specifies the zero-based number of the first sector of the partition:

partition=/dev/sda1
  start=2048

sectors=sectors

Specifies the number of sectors per track.

disktab=disktab-file

Superceded by the disk= option.

fix-table

If set, allows LILO to adjust 3D addresses (addresses specified as sector/head/cylinder) in partition tables. This is sometimes necessary if a partition isn't track aligned and another operating system, such as MS-DOS, is on the same disk. See the lilo.conf manpage for details.

force-backup=backup-file

Is like backup, but overwrites an old backup copy if one exists.

ignore-table

Tells LILO to ignore corrupt partition tables.

install=boot-sector

Installs the specified file as the new boot sector. If install is omitted, the boot sector defaults to /boot/boot.b.

linear

Generates linear sector addresses, which do not depend on disk geometry, instead of 3D (sector/head/cylinder) addresses. If LILO can't determine your disk's geometry itself, you can try using linear; if that doesn't work, then you need to specify the geometry with disk=. Note, however, that linear sometimes doesn't work with floppy disks, and it may conflict with compact.

map=map-file

Specifies the location of the map file. Defaults to /boot/map.

message=message-file

Specifies a file containing a message to be displayed before the boot prompt. The message can include a formfeed character (Ctrl-L) to clear the screen. The map file must be rebuilt by rerunning the lilo command if the message file is changed or moved. The maximum length of the file is 65,535 bytes.

nowarn

Disables warning messages.

optional

Specifies that any image that is not available when the map is created should be omitted and not offered as an option at the boot prompt. Like the per-image option optional, but it applies to all images.

password=password

Specifies a password that the user is prompted to enter when trying to load an image. The password is not encrypted in the configuration file, so if passwords are used, permissions should be set so that only the superuser is able to read the file. This option is like the per-image password option, except that all images are password protected and they all have the same password.

prompt

Automatically displays the boot prompt without waiting for the user to press the Shift, Alt, or Scroll Lock key. Note that setting prompt without also setting timeout prevents unattended reboots.

restricted

Can be used with password to indicate that a password needs to be entered only if the user specifies parameters on the command line. It is like the per-image restricted option, but applies to all images.

serial=parameters

Allows the boot loader to accept input from a serial line as well as from the keyboard. Sending a break on the serial line corresponds to pressing a Shift key on the console to get the boot loader's attention. All boot images should be password protected if serial access is insecure (e.g., if the line is connected to a modem). Setting serial automatically raises the value of delay to 20 (i.e., two seconds) if it is less than that. The parameter string parameters has the following syntax:

port[,bps[parity[bits]]]
For example, to initialize COM1 with the default parameters:
serial=0,2400n8
The parameters are:

timeout=tsecs

Sets a timeout (specified in tenths of a second) for keyboard input. If no key has been pressed after the specified time, the default image is automatically booted. timeout is also used to determine when to stop waiting for password input. The default timeout is infinite.

verbose=level

Turns on verbose output, where higher values of level produce more output. If -v is also specified on the LILO command line, the level is incremented by one for each occurrence of -v. The maximum verbosity level is 5.



Library Navigation Links

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











??????????????@Mail.ru