LILO

LILO is an acronym for LInux LOader and has been used to boot Linux on x86 systems for many years. Although GRUB is now the default boot loader, some prefer to use LILO because it is more familiar to them and others use it out of necessity, since GRUB may have trouble booting some hardware.

LILO and the x86 Boot Process

This section will discuss in more detail the specific role LILO plays when booting an x86 system. For a detailed look at the overall boot process, see the Section called A Detailed Look at the Boot Process in Chapter 3.

LILO loads itself into memory almost identically to GRUB, except it is only a two stage loader.

  1. The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR[1]. The primary boot loader exists on less than 512 bytes of disk space within the MBR. The only thing it does is load the Stage 2 boot loader and pass to it disk geometry information.

  2. The Stage 2 or secondary boot loader is read into memory. The secondary boot loader displays the Red Hat Linux initial screen. This screen allows you to select which operating system or Linux kernel to boot.

  3. The Stage 2 boot loader reads the operating system or kernel and initrd into memory. Once LILO determines which operating system to start, it loads it into memory and hands control of the machine to that operating system.

Once the Stage 2 boot loader is in memory, LILO displays the initial Red Hat Linux screen with the different operating systems or kernels it has been configured to boot. If you only have Red Hat Linux installed and have not changed anything in LILO's configuration file, you will see only linux as an option. If you install SMP kernel support, you will see linux-up as an option. If you have set up LILO to boot other operating systems as well, this screen is your chance to select what operating system will boot. Use your arrow keys to highlight the operating system and press [Enter]

If you would like to have a command prompt to enter a command to LILO, press [Ctrl]-[X]. LILO displays a LILO: prompt on the screen and waits for input from the user.

LILO vs. GRUB

In general, LILO works similarly to GRUB except for three major differences:

The first point means the command prompt for LILO is not interactive and only allows one command with arguments.

The last two points mean that if you change LILO's configuration file or install a new kernel, you must rewrite the Stage 1 LILO boot loader to the MBR by issuing the /sbin/lilo -v -v command. This is more risky than GRUB's method, because a misconfigured MBR leaves the system unbootable. With GRUB, if the configuration file is erroneously configured, it will simply default to its command line interface.

TipTip
 

If you upgrade the kernel using the Red Hat Update Agent, the MBR will be updated automatically. For more information on RHN, refer to the following URL, https://rhn.redhat.com

Notes

[1]

For more on the system BIOS and the MBR, see the Section called The BIOS in Chapter 3.