Originally Published: Tuesday, 4 September 2001 Author: Siddharth Khosla
Published to: learn_articles_firststep/General Page: 1/2 - [Printable]

The Linux Boot Process on the i386

Take another look at exactly what happens to your system during the boot process. Understanding the boot process is critical to understanding good useage and administration practices.

Booting LILO   Page 1 of 2  >>

What is Booting?

Before getting into the technicalities of the Linux boot process we should have a clear understanding of what exactly a "boot process" is. Whenever we switch on our computer or restart it, the whole process that results in your OS being loaded in its entirety comprises the boot process.


As soon as the computer is switched on control passes to the BIOS (The Basic Input Output System) which is present at the end of the read-only system memory. It can be said to be the lowest level interface between the computer and its peripherals. Once given control the BIOS checks all peripherals and does a few system checks. It then looks for a drive to boot from. The hierarchy of booting is customizable in the BIOS by running its setup. Usually it looks for someting to boot from in the floppy drive first and then from the cdrom drive. If no booting images are found in these peripherals it tries booting from the local hard drives. On the hard drive it looks for the MBR (Master Boot Record) in the first sector of the first hard drive (the primary master in most cases).

The MBR then looks for the first active partition in the drive. This active partition contains in its initial sectors what is known as a boot record. This boot record contains instructions on how to load the Boot Loader, which is a program used to load the particular OS. For Linux the boot loader is called the LInux LOader or LILO for short. As soon as the BIOS finds the LILO it runs it and control is passed on to the LILO.


Upon its initialization the LILO issues a prompt which asks the user for the label of the OS to which you want to boot. It also has a timeout specified upon the expiration of which the default OS specified is booted.

All these parameters: the timeout time, the OS labels, the default OS to boot and the type of disk etc are specified in a file called the LILO.conf. Thus for any changes to the LILO the lilo.conf file has to be changed. Now as we are looking into the linux boot process we consider that LILO starts to boot Linux. On booting Linux the first thing that LILO does is look for the boot kernel of Linux which is a file by the name of vmlinuz-22.15 ...and some version number. This file is found in the /boot directory. When vmlinuz is found LILO's role in the boot process ends and control is passed to the kernel.

The vmlinuz-22.15 kernel

The kernel is a program that controls the allocation and usage of the resources available to the operating system and divides them among its users. The very first thing that the linux kernel does is look for the init file which may be found in the /sbin directory. But the kernel does not limit its search in this directory but searches the whole partition and runs the first init it finds. When init is initialized by the kernel it becomes the first process of the kernel to run and thus is often referred to as the grandparent of all processes. From here on the control is passed on to INIT

Booting LILO   Page 1 of 2  >>