Next Previous Contents

3. The boot process.

This section is for the most based on the Bootdisk-HOWTO.

3.1 Bios

All PC systems start the boot process by executing code in ROM (specifically, the BIOS) to load the sector from sector 0, cylinder 0 of the boot drive. The boot drive is usually the first floppy drive (designated A: in DOS and /dev/fd0 in Linux). The BIOS then tries to execute this sector. On most bootable disks, sector 0, cylinder 0 contains either:

If a Linux kernel has been raw-copied to a diskette, a hard drive or another media, the first sector of the disk will be the first sector of the Linux kernel itself. This first sector will continue the boot process by loading the rest of the kernel from the boot device.

3.2 The boot loader

We will use a boot loader like lilo to operate our boot process. It permits to have the dev and production platforms on the same hardware and to switch from one to the other by only rebooting. The lilo boot loader is loaded by the bios. Then, it loads kernels or the boot sectors of other operating systems. It also provides a simple command-line interface to interactively select the item to boot with its options. More may be found in the Lilo documentation at ftp://sunsite.unc.edu/pub/Linux/system/boot/lilo/.

3.3 The Kernel

The kernel checks the hardware and mounts the root device. Then it looks for the init program on the root filesystem and executes it.

3.4 Init

Init is the parent of all other processes that will run on your linux OS, it will watch it's child processes and start, stop, re-lauch them if needed. init takes all information from /etc/inittab.

3.5 inittab

The file /etc/inittab/ refers to scripts named /etc/rc... to do the system setup. It also has entries for the getty tool to handle the login process.

3.6 The login process

There is one getty available in the inittab file for each console you allow for the users. Getty will launch /bin/login to verify the user password.

More info about the boot process may be found at Linux Documentation Project and in the init and inittab man pages.


Next Previous Contents