LILO (LInux LOader) Configuration: LILO principles

Next Previous Contents

## 2. LILO principles

Without getting too deep, let's just explain what booting a PC is all about.

## 2.1 The First Inhabitant: The BIOS

When a PC starts, the first program to take control is the BIOS, which is resident in ROM. After initializing most hardware in your machine, it attempts to load a tiny program, normally either from the first sector of the floppy or the first sector of the first hard drive. This program is called the Master Boot Record or MBR for short.

## 2.2 From the MBR of the hard drive to the OS

The MBR of the hard drive, using the BIOS, does one of two things.

The first possibility (like the MBR included with DOS) is that it locates the active partition and loads the first sector of that partition. This sector contain a tiny little program which knows a little bit more about the internals of the OS living in that partition. It will proceed to load either basic components of the system or simply a more sophisticated boot loader which will finish the job.

Alternatively, the MBR of the hard drive can load information directly from one of the partitions, and use that to load OS's on any partition. LILO can be configured this way; the OS/2 boot loader and Partition Magic, two other well-known bootloaders, do the same.

## 2.3 The floppy's boot sector

The boot sector of a floppy may be compared to the boot sector of the active partition. It normally proceeds to load the OS living on the floppy.

## 2.4 And LILO

LILO is fairly flexible, and here's why.

- It can be installed either as a replacement for the MBR or as the boot sector of a partition, and still boot Linux and most other OS's from any partition on any drive.
- It can be installed on the boot sector of the floppy and still perform its normal task, booting almost anything on the hard drive(s).
- Beside the boot sector, it has no hidden files, nor uses any special partition. Furthermore, its configuration files can be installed in any partition, even those unrelated to Linux, even in a subdirectory of a DOS partition.
- It can boot several different kernel configurations and even several different kernels.
- It can boot more than one Linux installation.
- It can boot linux on any drive.

## 2.5 LILO, Linux, and the world

When installing Linux on a system with several OS's (besides Linux), take this as a rule of thumb: Install and configure booting for all the other OS's first, because they are less flexible. It will then be easier to set up LILO to boot all the other OS's

Next Previous Contents