System Boot Process
Overview
The boot process is the sequence of events that occurs from pressing the power button to having a fully operational operating system. Understanding boot is essential for system administration, troubleshooting, and OS interviews — it’s where hardware and software meet.
Motivation
When you press the power button, the CPU has no software running and no memory content. The boot process must:
- Initialize hardware (CPU, memory, peripherals)
- Find and load the bootloader
- The bootloader loads the OS kernel
- The kernel initializes the system and starts services
- The system is ready for user login
Each stage must hand off control to the next in a reliable, well-defined manner.
Boot Sequence Overview
┌──────────────────────────────────────────────────────────────┐
│ Boot Sequence │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 1. Power On → Hardware Initialization │ │
│ │ POST (Power-On Self-Test) │ │
│ │ CPU starts at reset vector (0xFFFFFFF0 on x86) │ │
│ └───────────────────────┬──────────────────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 2. Firmware (BIOS/UEFI) │ │
│ │ Initialize hardware, find boot device │ │
│ │ BIOS: MBR (first 512 bytes of disk) │ │
│ │ UEFI: EFI System Partition (ESP) │ │
│ └───────────────────────┬──────────────────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 3. Bootloader (GRUB) │ │
│ │ Present boot menu, load kernel + initramfs │ │
│ └───────────────────────┬──────────────────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 4. Kernel Initialization │ │
│ │ Decompress, initialize subsystems, mount root fs │ │
│ └───────────────────────┬──────────────────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 5. Init System (systemd / SysVinit) │ │
│ │ Start services, reach target runlevel │ │
│ └───────────────────────┬──────────────────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 6. Login Prompt │ │
│ │ Display manager or TTY login │ │
│ └──────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
Topics in This Chapter
| Topic | Description |
|---|---|
| BIOS/UEFI | Firmware interfaces |
| Bootloader | GRUB and boot loading |
| Init Systems | systemd, SysVinit, OpenRC |
Quick Revision
- BIOS: Legacy firmware, MBR boot, 16-bit real mode
- UEFI: Modern firmware, GPT/ESP boot, 32/64-bit
- GRUB: Most common Linux bootloader
- Kernel: Initializes hardware, mounts root filesystem
- Init: First user-space process (PID 1), starts all other services
- systemd: Modern init system (parallel startup, dependency management)
Cross-References
- BIOS/UEFI — Firmware deep dive
- Bootloader — GRUB configuration and usage
- Init Systems — systemd and alternatives