Compiling Kernel   «Prev  Next»

Lesson 11 The LILO map installer
Objective Use LILO Map Installer to install Boot Loaders

Use LILO Map Installer to install Boot Loaders

Use the LILO map installer to install first- and second-stage boot loaders.Once you recompile your kernel, you must run the LILO map installer: /sbin/lilo. The LILO map installer installs the first- and second-stage boot loaders. It allows you to
  1. Boot different operating systems
  2. Select the operating system at boot time
  3. Pass parameters to the booting kernel

The installer looks through the new kernel and pulls out symbols, versions, and device information. LILO creates a map file from this information, which LILO will use to correctly boot Linux and other operating systems on your computer. For this to work, the installer needs to know:
  1. Which partitions contain boot sectors or root file systems
  2. How to pass control to bootable partitions

The LILO configuration file

/etc/lilo.conf contains a list of global options, followed by a block of commands called a stanza.
Every stanza holds commands and configuration information for each operating system on your computer. For example, if you have both Windows and Red Hat Linux on your computer, the Linux LILO configuration file would have a Windows-specific stanza and a Red Hat Linux-specific stanza.
You will need to edit the /etc/lilo.conf file so that the image= value matches the name of the kernel you copied into /boot. For example, if you built a 2.2.14-1 kernel and copied it into /boot with:

          
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.14-1

Then you will need to have image=/boot/vmlinuz-2.2.14-1 in /etc/lilo.conf.

Working with the LILO map installer

After editing your LILO configuration file, test them with /sbin/lilo -t. Assuming LILO does not give you an error message, install your new configuration with /sbin/lilo -v.
If you make a mistake, you can restore your previous copy with

/sbin/lilo -u .

The next lesson concludes this module.