Previous Section
 < Day Day Up > 
Next Section


Kernel Booting Steps

The kernel formulates the core Linux operating system and is supported by a number of loadable modules and commands. The loadable modules are shared libraries, and the commands are individual programs. Because of the modular design of the kernel, the core kernel is really very small and occupies much less space on the hard disk. In addition, the boot image of the kernel is even smaller, so that it can fit into a floppy disk to enable booting from the floppy. The boot image contains compressed as well as uncompressed code. Initially the uncompressed code is executed, which further unzips the compressed code. The sole purpose of the kernel boot image is to bootstrap itself during boot time. After successfully bootstrapping itself, the kernel tries to mount the root file system, which is identified in the boot image (as ‘/’ file system). If it fails to load the root file system, the boot process is said to have failed due to fatal error, and the kernel is panic at this stage. Initially, the root file system is mounted in read-only mode, and then the fsck program (stands for file system check) is executed to ensure that the root file system is clean. Once the root file system is checked, it is then remounted in read-write mode. After successfully remounting the root file system, the next step in the boot process is to mount the other file systems as specified in the /etc/fstab file. During the process of mounting the file systems, the fsck program is executed on all the file systems in the sequence specified in the /etc/fstab file to make sure that they are clean. A file system is said to be clean if it was properly unmounted during previous session shutdown.

The current kernel architecture permits the device drivers to be developed as loadable modules, which are loaded by the kernel on an as needed basis. A specific Linux distribution may include modules for a large variety of devices that can be installed on the computer. But the kernel loads only those modules that are required by the specific devices installed on (or attached to) the computer.

Finally, the kernel hands the control over to the init program located in the /sbin directory. The /sbin/init program is responsible for the rest of the tasks to start up the necessary processes, as outlined in the following section. However, remember that the init program is only a kickstarter of the initial system processes (and configured user processes), and after the init program completes its job, the kernel gains complete control of the system.



Previous Section
 < Day Day Up > 
Next Section