6. How an OS Boots Up?

1. Overview
When you press the power button:
5 Key Steps occur to load the OS from hardware to GUI.
Goal: Transition from BIOS/UEFI → Bootloader → OS Kernel.
2. Step-by-Step Boot Process
Step 1: Power On
What Happens?
- Electricity flows to power supply unit (PSU) → Distributes power to motherboard, CPU, storage.
Analogy: Turning on a car’s ignition → Engine (CPU) gets power.
Step 2: CPU Loads BIOS/UEFI
BIOS (Basic Input/Output System) / UEFI (Unified Extensible Firmware Interface):
Small program stored in ROM chip on motherboard.
UEFI = Modern BIOS (supports LAN, faster boot).
CPU Action:
- Fetches BIOS/UEFI instructions from ROM.
Key Term:
- Non-Volatile Memory: BIOS persists even when power is off (unlike RAM).
Step 3: POST & Hardware Initialization
POST (Power-On Self-Test):
BIOS checks hardware (RAM, GPU, HDD) for errors.
Example: Beeps if RAM is missing.
CMOS Battery:
- Preserves BIOS settings (time, boot order) via a small battery.
Fun Fact: Remove CMOS battery → BIOS resets to default!
Step 4: Locate Boot Device
Boot Device: Storage with OS (HDD, SSD, USB).
BIOS Searches For:
MBR (Master Boot Record): Old method (sector 0 of disk).
EFI Partition: Used by UEFI (separate partition for boot files).
Handoff: BIOS passes control to bootloader.
Why UEFI?:
Supports disks >2TB (MBR limitation).
Faster boot (no sector 0 scanning).
Step 5: Bootloader Loads OS
Bootloader’s Job:
Loads OS kernel into RAM.
Examples:
Windows:
bootmgr.exe
Linux: GRUB
macOS:
boot.efi
Final Step:
- Kernel initializes GUI, drivers, and user apps.
Analogy:
BIOS = Construction crew (prepares site).
Bootloader = Foreman (starts building).
Kernel = Architect (manages the OS).
3. Key Components Explained
Term | Purpose | Example |
BIOS/UEFI | Low-level hardware check & init. | Sets boot order (USB → SSD). |
MBR | Legacy boot sector (512 bytes). | Used in Windows XP. |
EFI | Modern boot partition (UEFI). | Used in Windows 10+, Linux. |
Bootloader | Loads OS kernel. | GRUB (Linux), bootmgr (Windows). |
4. Why This Matters?
Troubleshooting:
- No beep during POST? → Hardware issue (e.g., RAM failure).
Dual Booting:
- Bootloader (e.g., GRUB) lets you choose between OSes.
Security:
- UEFI supports Secure Boot (blocks malware).
5. Interview Questions
Difference between BIOS and UEFI?
- BIOS uses MBR; UEFI uses EFI partition + supports Secure Boot.
What is POST?
- Hardware diagnostic test run by BIOS.
Role of the bootloader?
- Loads OS kernel into memory from disk.
6. Homework
Check Your System:
Windows: Run
msinfo32
→ Check "BIOS Mode" (Legacy/UEFI).Linux: Run
ls /sys/firmware/efi
(if folder exists → UEFI).
Explore GRUB:
- On Linux, edit
/etc/default/grub
to customize boot options.
- On Linux, edit
Visual Summary
Power On → BIOS/UEFI → POST → Boot Device → Bootloader → OS Kernel → GUI
Key Takeaways:
BIOS/UEFI = Hardware checker.
Bootloader = OS loader (GRUB,
bootmgr
).UEFI > BIOS (faster, secure, supports large disks).
Subscribe to my newsletter
Read articles from Tanish Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
