The /sbin/lilo -v -v command accesses the LILO configuration file, /etc/lilo.conf, to determine what to write to the MBR. If you are planning on using the lilo command, you need to know how to edit this file.
Warning | |
---|---|
If you are planning to edit /etc/lilo.conf, be sure to make a backup copy of the file before making any changes. Also, be sure that you have a working boot floppy available so that you will be able to boot the system and make changes to the MBR if there is a problem. See the man pages for mkbootdisk for more information on creating a boot disk. |
The file /etc/lilo.conf is used by lilo to determine which operating system or kernel to start, as well as to know where to install itself (for example, /dev/hda for the first MBR of the first IDE hard drive). A sample /etc/lilo.conf file looks like this (your /etc/lilo.conf may look a little different):
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 message=/boot/message lba32 default=linux image=/boot/vmlinuz-2.4.0-0.43.6 label=linux initrd=/boot/initrd-2.4.0-0.43.6.img read-only root=/dev/hda5 other=/dev/hda1 label=dos |
This example shows a system configured to boot two operating systems: Red Hat Linux and DOS. Here is a deeper look at a few of the lines of this file:
boot=/dev/hda tells LILO to install itself on the first hard disk on the first IDE controller.
map=/boot/map locates the map file. In normal use, this should not be modified.
install=/boot/boot.b tells LILO to install the specified file as the new boot sector. In normal use, this should not be altered. If the install line is missing, LILO will assume a default of /boot/boot.b as the file to be used.
The existence of prompt tells LILO to
show you whatever is referenced in the
message line. While it is not
recommended that you remove the prompt
line, if you do remove it, you can still get a prompt by
holding down the
timeout=50 sets the amount of time that LILO will wait for user input before proceeding with booting the default line entry. This is measured in tenths of a second, with 50 as the default.
message=/boot/message refers to the screen that LILO displays to let you select the operating system or kernel to boot.
lba32 describes the hard disk geometry to LILO. Another common entry here is linear. You should not change this line unless you are very aware of what you are doing. Otherwise, you could put your system in an unbootable state.
default=linux refers to the default operating system for LILO to boot from the options listed below this line. The name linux refers to the label line below in each of the boot options.
image=/boot/vmlinuz-2.4.0-0.43.6 specifies the linux kernel to boot with this particular boot option.
label=linux names the operating system option in the LILO screen. In this case, it is also the name referred to by the default line.
initrd=/boot/initrd-2.4.0-0.43.6.img refers to the initial ram disk image that is used at boot time to actually initialize and start the devices that makes booting the kernel possible. The initial ram disk is a collection of machine-specific drivers necessary to operate a SCSI card, hard drive, or any other device needed to load the kernel. You should never try to share initial ram disks between machines.
read-only specifies that the root partition (see the root line below) is read-only and cannot be altered during the boot process.
root=/dev/hda5 tells LILO what disk partition to use as the root partition.