Chapter 4. Configure the boot loader

Table of Contents
4.1. Configure the LILO boot loader
4.2. Configure the GRUB boot loader
4.3. Configure the SYSLINUX boot loader

When a PC boots the CPU it runs code from Read-Only Memory. This code is the Basic Input/Output System, or BIOS. The BIOS then loads a boot loader from the Master Boot Record of the first hard disk.[1] In turn, the boot loader reads the operating system into memory and then runs it.[2]

Neither the BIOS nor the boot loader are strictly necessary. For example, there are versions of Linux that run directly from the flash memory which usually contains the BIOS. Linux was originally designed to run without an interactive boot loader, by placing the kernel at particular sectors of the disk.

The benefits of using a boot loader are:

For these reasons systems administrators want to be able to interactively control the boot loader from the serial console.

LILO, GRUB and SYSLINUX are popular boot loaders for IBM PCs. Find which of these boot loaders your Linux installation uses and then follow the instructions for your boot loader in the following section.

Notes

[1]

As usual with IBM PC/AT hardware "loads a boot loader from the MBR of the first hard disk" is a simplification. BIOS settings permitting, the MBR can be loaded from the first two detected hard disks of any controller card containing a BIOS extension. Thus the MBR can be loaded from one of the first two detected IDE disks and one of the first two detected SCSI disks.

[2]

Another simplification. A 512 byte MBR is too small to contain a program big enough to load a complex operating system. Thus most boot loaders have two stages, the first stage is located in the MBR and is only able to load the second stage of the boot loader from somewhere on a disk (such as the boot sector of the first partition). The second stage of the boot loader presents the user interface and loads the operating system.

mirror server hosted at Truenetwork, Russian Federation.