Bootstrap Loader
Do you know what happens when we start a computer? Let’s understand the process step by step:
When we press the power-on button, the BIOS/UEFI runs first and checks that all the hardware components—such as the CPU, RAM, keyboard, and hard disk—are working correctly. If there is any problem, it gives an error beep or message. This process is called POST (Power-On Self Test).
When POST is completed and no errors are found, the Bootstrap Loader starts working. It is a small program inside the BIOS/UEFI that locates the operating system (Windows, Linux, etc.), loads its kernel into RAM, and hands over control to the operating system.
SO, The Bootstrap Loader is a small program inside the BIOS/UEFI that finds the Operating System and loads its kernel into RAM, then transfers control to the OS.
- Locates the Operating System (Windows, Linux, etc.)
- Loads the OS kernel into RAM,
- And hands over the control to the Operating System.
Types of Bootstrap Loader:
- Primary Boot Loader – Minimal code that identifies and loads the secondary loader.
- Secondary Boot Loader – More advanced, e.g. GRUB (Linux) or Windows Boot Manager, which can present boot menus or load different OS kernels.
Here are some key points about the Bootstrap Loader:
1. Purpose and Role
- It is the very first software that runs after the hardware test (POST).
- Bridges the gap between firmware and the operating system.
2. Location
- Stored in non-volatile memory (ROM/EEPROM/Flash) as part of the BIOS or UEFI firmware.
- Ensures it is available even when the main storage is empty.
3. Functioning Steps
- Finds the bootable device (hard disk, SSD, USB, network).
- Reads the boot sector or EFI system partition.
- Loads the secondary boot loader or the OS kernel into RAM.
- Passes control to the kernel to continue the boot process.
4. Flexibility
- Allows multi-booting (choosing between multiple operating systems).
- Supports features like recovery mode and safe boot.
5. Importance
- Without a working bootstrap loader, no operating system can start.
- Critical for system recovery and troubleshooting (e.g., repairing the MBR or EFI partition).
Example:
- Windows: Windows Boot Manager (bootmgr)
- Linux: GRUB, LILO
- Mac: Boot.efi