
56 Chapter 3. Boot Process, Init, and Shutdown
GRUB or LILO uses the settings in the MBR to display boot options and allow for user input on which
operating system to actually start up.
But this begs the question: How does the boot loader in the MBR know what to do when the MBR is
read? LILO actually has already written the instructions there through use of the lilo program with
in turn reads the /etc/lilo.conf configuration file. The boot instructions for GRUB written in the
/boot/grub/grub.conf configuration file. For more information about GRUB, see Chapter 4.
3.2.1. Options in /etc/lilo.conf
Most of the time, you will have no need to change the Master Boot Record on your hard drive unless
you need to boot a newly installed operating system or want to use a new kernel. If you do need to
create a new MBR using LILO but using a different configuration, you will need to log in as root, edit
/etc/lilo.conf, and run the lilo command again.
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 to utilize or which
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:
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 (your /etc/lilo.conf may look a little
different):
• 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.
Commenti su questo manuale