Kernel Boot
Look at messages generated during kernel boot and explore the internals of the more interesting ones.
Thursday, June 15th, 2006
In this month’s “Gearheads” column, let’s take a look at the protected mode boot process. Let’s skim through kernel boot messages and hit the brakes whenever something looks interesting.
Boot-Up Overview
Linux boot on x86- based hardware is set into motion when the BIOS loads the Master Boot Record (MBR) from the boot device. Code residing in the MBR looks at the partition table and reads a Linux bootloader such as GRUB, LILO, or SYSLINUX from the active partition. The final stage of the bootloader loads the compressed kernel image and then passes control to the kernel, which uncompresses itself and turns on the ignition.
The first-level kernel initializations are done in real mode assembly. Subsequent start-up is performed in protected mode by the function start_kernel() defined in init/main.c. start_kernel() first initializes the CPU subsystem. Memory and process management operations are put in place soon after. Peripheral buses and I/O devices are started next. As the last step in the boot sequence, the init program, the parent of all Linux processes, is invoked. init executes user space boot scripts to load necessary kernel modules. It finally spawns terminals on consoles and displays the login prompt.
Each section header in this article is a message generated during the boot progression. The messages were produced on an x86 laptop; the semantics and the messages themselves may change if you are booting the kernel on other architectures.
“BIOS-provided physical RAM map”