Skip to content

The boot process

Exercise storage-boot-annex.pdf · PDF

You press the power button. For a few seconds you see a logo, maybe a black screen, then your login. It feels like one step. It is actually a relay race of five or six runners, each handing the baton to the next.

Why should you care? Because the day a computer "does not start", you need to know which runner dropped the baton — the power supply, the firmware, the disk, or the operating system. Every technician's first question is: how far did it get?

What you will learn

  • Why a computer needs help to start at all: the bootstrap problem
  • What the firmware is, and what POST checks
  • The difference between the old BIOS and modern UEFI
  • What a bootloader does (GRUB, Windows Boot Manager) and how the kernel takes over
  • What Secure Boot protects against
  • How to diagnose "it doesn't start" by asking how far did it get?

The bootstrap problem

Here is a riddle. The CPU only does one thing: fetch → decode → execute instructions from RAM (Computer architecture). The operating system is a program. So to start the operating system, the CPU needs it in RAM. But RAM is volatile: at power-on it is empty. And copying the operating system from the disk into RAM... is a job that needs a program.

Who runs the first program?

The answer is a small program stored in a chip that does not forget: the firmware. Starting a computer is called booting, from "pulling yourself up by your own bootstraps" — an impossible trick that computers solve with this tiny, permanent first program.

In the kitchen: every morning the countertop (RAM) is empty and the chef (CPU) has no recipe. Taped to the wall next to the door there is one short card that never goes away. It says: "Check the kitchen. Then go to the pantry and fetch the recipe book." That card is the firmware.

The relay race

flowchart LR
    PSU["<b>1 · Power supply</b><br>stable voltage,<br>'power good'"] --> FW["<b>2 · Firmware</b><br>BIOS or UEFI,<br>from a flash chip"]
    FW --> POST["<b>3 · POST</b><br>self-test: CPU,<br>RAM, graphics..."]
    POST --> BL["<b>4 · Bootloader</b><br>GRUB or Windows<br>Boot Manager"]
    BL --> K["<b>5 · Kernel</b><br>the OS core takes<br>control of the hardware"]
    K --> U["<b>6 · Login</b><br>services start,<br>you log in"]

1. Power supply

The power supply unit (PSU) turns the wall's alternating current into the low, steady voltages the components need (12 V, 5 V, 3.3 V). Only when those voltages are stable does it send a "power good" signal to the motherboard. Until then, the CPU is held in reset. Nothing has run yet.

2. Firmware

Firmware is software stored permanently in a chip on the motherboard. It is the first code the CPU runs.

The CPU is wired to start fetching from one fixed address, and that address points into the firmware chip (flash memory — the same technology as an SSD, see Storage). There are two generations:

BIOS UEFI
Full name Basic Input/Output System Unified Extensible Firmware Interface
Era Original IBM PC, 1981 Began at Intel as EFI in 1998; UEFI Forum since 2005
Look Blue/grey text menus, keyboard only Often graphical, mouse works
Finds the OS by Reading the first sector of the disk (MBR) Reading a boot file from a special partition (the EFI System Partition)
Disk size it can boot from Up to 2 TiB Practically unlimited
Secure Boot No Yes

Every PC sold today uses UEFI. People still say "go into the BIOS" out of habit — and many UEFI setups even keep a compatibility mode (CSM, Compatibility Support Module) that pretends to be a BIOS. Windows 11 requires UEFI with Secure Boot support.

You enter the firmware setup by pressing a key right after power-on — usually Del or F2, depending on the brand. There you can change the boot order: the list of devices the firmware tries, in turn (internal disk, USB stick, network...). That list is how you boot from a USB stick to install an operating system — you will do exactly that in Unit 2.

3. POST

POST (Power-On Self-Test) is the firmware's quick health check of the essential hardware.

The firmware checks that the CPU works, that RAM is present and answers, that there is a graphics output, a keyboard... If something essential is missing, it cannot even show an error on the screen — so it beeps a pattern, or blinks a coloured LED on the motherboard. The meaning of the beeps depends on the manufacturer: look it up in the motherboard manual.

The classic student PC

A desktop PC powers on, fans spin, but the screen stays black and it beeps several times. The PSU did its job (fans spin). The firmware is running (it beeps). POST failed — almost always a badly seated RAM stick. Reseat it, try again.

4. Bootloader

POST passed. The firmware now walks the boot order and finds a disk with something bootable on it. What it loads is not the operating system yet, but a tiny program whose only job is to load it:

A bootloader is a small program that finds the operating system's kernel on the disk, loads it into RAM, and jumps to it.

  • On Linux the usual one is GRUB (GRand Unified Bootloader). It is also the menu you see when a computer has both Linux and Windows installed: which one do you want?
  • On Windows it is Windows Boot Manager.

On a UEFI machine, the bootloader is an ordinary file (for example \EFI\Microsoft\Boot\bootmgfw.efi) stored in the EFI System Partition, a small FAT32 partition on the disk. On an old BIOS machine, the first stage had to squeeze into the MBR: the very first 512-byte sector of the disk.

MBR and GPT, very briefly

MBR (Master Boot Record) and GPT (GUID Partition Table) are two ways of writing a disk's "table of contents" — the list of its partitions. MBR is the old one (max 4 primary partitions, max 2 TiB); GPT is the modern one that goes with UEFI. More on that in Unit 4.

5. Kernel

The kernel is the core of the operating system: the program that controls the hardware and shares it among all the other programs.

The bootloader loads the kernel into RAM and hands over the CPU. From this moment the firmware has finished its job. The kernel detects the hardware, loads its drivers (see Peripherals), mounts the disk, and starts the first process, which starts everything else: network, sound, the login screen. On most Linux systems that first process is systemd.

In the kitchen: the card on the wall has been read, the recipe book is on the countertop, and the head chef is now in charge. The card will not be needed again until tomorrow morning.

Secure Boot

A bootloader runs before the operating system — before any antivirus, before any password. Malware that replaces the bootloader (a bootkit) would control the machine from its very first instruction, invisible to everything that loads after it.

Secure Boot is a UEFI feature: the firmware only runs bootloaders that carry a valid digital signature from a trusted key.

It was added to the UEFI specification and became widely used with Windows 8 in 2012. The firmware stores a list of trusted keys (Microsoft's among them); an unsigned or tampered bootloader is refused. Most big Linux distributions boot with Secure Boot on, through a small bootloader signed by Microsoft (the shim).

A digital signature is like a wax seal on a letter: anyone can check it, only the owner of the key can make it. You will meet signatures again in the cybersecurity part of the course.

"It doesn't start": how far did it get?

What you see Runner that dropped the baton First thing to check
Nothing: no fans, no lights Power supply Plug, power strip, PSU switch
Fans spin, black screen, beeps or LED Firmware / POST RAM seated, graphics card, monitor cable
Logo, then "No bootable device" Firmware can't find a bootloader Boot order, disk connected, disk alive
GRUB prompt or Windows recovery screen Bootloader can't find or load the kernel Boot repair (Unit 2)
Starts loading, then freezes or crashes Kernel / operating system Drivers, recent updates

Key takeaways

  • Booting solves a chicken-and-egg problem: RAM is empty at power-on, so the first program must live in a permanent chip — the firmware.
  • The relay: PSU → firmware → POST → bootloader → kernel → login.
  • UEFI replaced the old BIOS: bigger disks, GPT, a boot file in the EFI System Partition, and Secure Boot.
  • The bootloader (GRUB, Windows Boot Manager) loads the kernel into RAM and hands it the CPU.
  • Secure Boot only runs signed bootloaders, blocking bootkits that would load before any defence.
  • To diagnose a PC that won't start, ask: how far did it get?

Quick check

1. Why can't the CPU load the operating system on its own at power-on?
  • RAM is empty, and the CPU only runs instructions from memory
  • The CPU has to wait for the operating system to wake it up
  • The disk is locked until the user types a password
  • The CPU is too slow to read the disk without help

RAM is volatile, so at power-on it holds nothing. The CPU is wired to start at a fixed address in the firmware chip, which is permanent — that is the first program, and it starts the chain.

2. What is the job of POST?
  • To check that essential hardware like RAM and graphics works
  • To choose between Linux and Windows on a dual-boot machine
  • To download the latest updates for the operating system
  • To check the digital signature of the bootloader

POST is the Power-On Self-Test run by the firmware. If it fails, the machine usually beeps or blinks an LED, because the screen may not work yet. Choosing an OS is the bootloader's job; checking signatures is Secure Boot.

3. What does a bootloader such as GRUB do?
  • Loads the operating system kernel into RAM and starts it
  • Tests the RAM and the CPU before anything else runs
  • Converts alternating current into stable voltages
  • Stores the list of trusted keys for Secure Boot

The bootloader finds the kernel on the disk, copies it into RAM, and hands it the CPU. Testing hardware is POST, voltages are the PSU, and trusted keys live in the UEFI firmware.

4. What does Secure Boot protect against?
  • Malware that replaces the bootloader to run before the OS
  • Someone stealing the laptop and reading the disk
  • A power cut that happens while the disk is writing
  • A user who forgets the password of their account

A bootkit runs before the operating system and any antivirus. Secure Boot makes the firmware refuse any bootloader without a valid digital signature. It does not encrypt the disk and has nothing to do with account passwords.

5. Which statement about BIOS and UEFI is correct?
  • UEFI is the modern firmware that replaced BIOS and supports Secure Boot
  • BIOS is the modern firmware that replaced UEFI and supports GPT disks
  • UEFI is a part of Windows, while BIOS is a part of Linux
  • BIOS and UEFI are two names for the same kind of bootloader

BIOS dates from the IBM PC (1981); UEFI replaced it on modern machines, with GPT disks and Secure Boot. Both are firmware on the motherboard, not part of any operating system, and neither is a bootloader.

6. A classmate's PC: fans spin, the screen shows the maker's logo, then “No bootable device found”. Select the two most sensible first checks.
  • Look at the boot order in the firmware setup
  • Check that the disk is connected and detected
  • Replace the power supply unit with a new one
  • Reseat the RAM sticks because POST failed

The logo means the PSU worked and POST passed. The firmware then could not find a bootloader: either the boot order points to the wrong device, or the disk is missing or dead.

The kernel is now in control — but it still has to talk to your keyboard, screen and headphones. Next: Peripherals.