Unraveling Linux Boot: From BIOS Power‑On to Kernel Init
This article explains the complete Linux boot sequence, covering BIOS initialization, POST self‑test, MBR structure, primary and secondary boot loaders like GRUB, kernel decompression, transition to protected mode, and the init process that finally hands control to the user login prompt.
Linux System Boot Process
When a computer powers on, the CPU starts in real mode at address 0xFFFF0, which points to the BIOS stored in a ROM chip. The BIOS performs the Power‑On Self‑Test (POST), initializes hardware, and builds an interrupt vector table in the first 1 KB of RAM.
Boot Sequence and MBR
The BIOS follows the boot order configured in CMOS, reads the first sector of the selected device (the Master Boot Record, 512 bytes). The MBR contains a 446‑byte primary boot loader, a 64‑byte partition table for up to four primary partitions, and the 0x55AA signature.
The primary boot loader scans the partition table, finds the active partition, loads its secondary boot loader (e.g., GRUB or LILO) into memory, and transfers control.
Secondary Boot Loader (GRUB)
GRUB can read ext2/ext3 filesystems, presents a menu for selecting an operating system, and loads the chosen Linux kernel image (zImage or bzImage) into memory using BIOS interrupt 0x13 services.
Kernel Decompression and Transition to Protected Mode
The compressed kernel image is decompressed (via decompress_kernel), placed in high memory, and the kernel’s start_kernel() routine initializes hardware, memory management, and the init process.
Init Process and Runlevels
The first user‑space program is /sbin/init, which reads /etc/inittab to set the runlevel (0‑6) and executes the appropriate rc scripts, loads kernel modules, and finally starts /bin/login for user authentication.
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
