LILO can boot a kernel image from several locations, such as a regular file on the root filesystem or any other mounted filesystem, a block device such as a floppy disk, or the boot sector of another partition or disk. The type of boot is dictated by entries in a configuration file. Boot image configuration files can have several variables defined, all of which have been mentioned in the preceding sections. Valid configuration file variables include alias, label, optional, password, ramdisk, read-only, read-write, restricted, root, and vga.
To boot a kernel image from a file, all that is necessary in the configuration file is the name of the image. For example, the line
image=/linux_main
boots the image called linux_main.
To boot an image from another device, the sectors that must be read on that device have to be specified. Several methods of providing the sector information exist. The starting sector must be provided, but you can then either specify a number of sectors to be read (start+length) or the end sector number (start-finish). If only one number is provided (the start sector), only that sector is read.
For example, the contents of this configuration file
image=/dev/fd0
range=1+512
will boot the kernel from the floppy disk, starting at sector 1 and reading the next 512 sectors.
You can specify more than one configuration for an image because LILO stores values in an image descriptor file and not in the image itself. For example, a configuration file can contain the following entries:
image=/linux_main
label=linux-hda1
root=/dev/hda1
image=/linux_main
label=linux-hda3
root=/dev/hda3
image=/linux_main
label=linux-flop
root=/dev/fd0
This code has three configurations for the same Linux kernel (linux_main), but it also has different root devices with three different alternate names. The boot devices for the image are /dev/hda1, /dev/hda3, and /dev/fd0 respectively. Whitespace in the configuration file is ignored, so the indentations are for ease of reading only.



