>_
EngineeringNotes
← Back to OS Internals
Chapter 04

Booting & Memory Hierarchy

Understanding the startup sequence, CPU architectures, and the multi-layered storage hierarchy that powers computation.

01

Phase 1: Hardware & Firmware

When you press the power button, the CPU is essentially "brain dead." It needs a tiny, built-in program to tell it how to find the Operating System.

The BIOS / UEFI

The Basic Input/Output System is stored on the motherboard in a non-volatile ROM chip. Modern PCs use UEFI (Unified Extensible Firmware Interface) which is faster and supports larger disks.

POST (The Health Check)

Before doing anything else, the BIOS performs a Power-On Self-Test. It checks if the RAM, Keyboard, and CPU are functioning. If POST fails, the system stops and emits a "beep" code.

The Booting Pipeline

1
Power On

Electricity flows to CPU

2
BIOS / UEFI Load

CPU reads ROM chip

Executing POST... (Check RAM/Hardware)
3
MBR / GPT Search

Look for Master Boot Record

4
Bootloader (GRUB)

Initialize OS Kernel

02

Phase 2: The Handover

Once BIOS finds a bootable disk, its job is over. It hands the "baton" to a small program sitting in the very first sector of the disk (MBR).

1
Locate Kernel

Bootloader finds where the OS Kernel is stored on the disk and loads it into RAM.

2
Initialize Hardware

Kernel takes over, detects hardware, and initializes device drivers.

3
First Process (Init)

Kernel starts the very first user-space process (called init or systemd in Linux).

System Boot Log

[ 0.000000] Linux version 5.15.0-gener...

[ 0.124501] CPU0: Intel(R) Core(TM) i9...

[ 0.456012] Memory: 16384K/32768K available

[ 0.892110] Freeing unused kernel memory...

[ 1.250110] Run /sbin/init as process 1

System Ready. Login: _