Search This Blog

Wednesday, December 30, 2009

Kernel Initialization

Kernel boot time functions
• Device detection
• Device driver initialization
• Mounts root filesystem read only
• Loads initial process (init)

The kernel initialization files generate good output, but scroll by quickly. A good way to examine this output is to view /var/log/dmesg, which contains a snapshot of these kernel messages taken just after control is passed to init. Review of this output will reveal the basic initialization steps of the Linux kernel.

Device drivers compiled into the kernel are called, and will attempt to locate their corresponding devices. If successful in locating the device, the driver will initialize and usually log output to the kernel message buffer.

If necessary (needed for boot) drivers have been compiled as modules instead of into the kernel, then they must be included in an initrd image, which is then temporarily mounted by the kernel on a RAM disk to make the modules available for the initialization process.

After all the necessary drivers are loaded, the kernel will mount the root filesystem read-only.

The first process is then loaded (init) and control is passed from the kernel to that process.

No comments: