Kernel Initialization



 

 


After GRUB has loaded the kernel into RAM it turns over execution to the kernel. The first thing that the kernel does is to initialize memory and set up memory allocation tables. It initializes all I/O devices including the hard drives and mounts the root filesystem (/) in read-only mode. The rest of the filesystems are mounted later.

After initialization, the kernel loads init, the mother of all processes and turns control over to it. init is always PID (Process ID) 1. See Startup Using SystemV Init Scripts for details of the startup process with the old SystemV init scripts and init.

In more recent versions of Fedora since Fedora 14, the systemd daemon replaces init. The systemd program performs the same functions as init and more. See Starting and Managing Linux Services Using systemd for details of the startup process with systemd.

NOTE: Kernel initialization and launching init is the end of the boot process. The Startup process is launched by init or systemd and takes over the process of launching daemons and programs that bring the Linux computer up to a usable state.

There is a really good exposition of the complete kernel boot process in excruciating detail at http://duartes.org/gustavo/blog/post/kernel-boot-process if you are interested.