When a computer boots up, it runs a fixed sequence: the CPU starts executing firmware stored in non-volatile memory (the BIOS or UEFI), which initializes hardware, runs a power-on self-test (POST), and then locates a bootable device. The firmware loads the first stage of the operating system (the bootloader), which in turn loads the OS kernel and hands control to it. The kernel initializes drivers and system services, and finally starts the user session.
Background: From ROM to Operating System
The term "boot" comes from "bootstrap," the idea that a computer pulls itself up by its own bootstraps. Early computers required operators to enter a small program manually via switches; that program then loaded a larger one from paper tape or disk. Modern computers automate this chain but follow the same principle: a small, fixed program in read-only memory (ROM) loads progressively larger and more capable software until the operating system is running.
Two firmware standards dominate. The older BIOS (Basic Input/Output System) dates from the early IBM PC era and runs in 16-bit real mode with a 1 MB address limit. UEFI (Unified Extensible Firmware Interface) is the modern replacement, supporting 32- or 64-bit operation, larger disks (GPT partitioning), secure boot, and a graphical setup interface. Most PCs built after the early 2010s use UEFI, often with a compatibility support module (CSM) to boot older BIOS-style operating systems.
The Boot Sequence Step by Step
Although details vary by hardware and firmware, the core sequence is consistent:
- Power supply stabilization: When you press the power button, the power supply unit (PSU) converts AC to DC and sends a "power good" signal to the motherboard. The CPU receives a reset signal and begins executing code from a fixed address.
- Firmware execution: The CPU jumps to the firmware chip (SPI flash on modern boards). The firmware initializes memory controllers, checks basic hardware, and runs the power-on self-test (POST). POST verifies that the CPU, RAM, and essential devices are present and functional; errors are reported via beep codes, LEDs, or on-screen messages.
- Hardware initialization: The firmware enumerates devices on the PCI bus, USB controllers, storage controllers, and input devices. It may display a splash screen and offer a key to enter setup (often Del, F2, or F10).
- Boot device selection: The firmware reads the boot order from non-volatile settings (stored in CMOS or NVRAM) and attempts to find a bootable device. In UEFI, it looks for an EFI System Partition (ESP) on a GPT disk containing a bootloader file (typically
\EFI\BOOT\BOOTX64.EFIor a vendor-specific path). In BIOS, it reads the master boot record (MBR) of the first sector of the disk. - Bootloader stage: The bootloader (e.g., GRUB, Windows Boot Manager, systemd-boot) loads the OS kernel and initial ramdisk into memory. On Linux, GRUB may present a menu; on Windows, the Boot Manager may show a choice of operating systems.
- Kernel initialization: The OS kernel takes over. It sets up memory management, scheduler, and drivers for storage, input, display, and network. On Linux, the kernel mounts the initial ramdisk (initramfs) to load necessary drivers before switching to the real root filesystem. On Windows, the kernel (ntoskrnl.exe) and the session manager (smss.exe) start.
- User-space initialization: The first user-space process (init or systemd on Linux, wininit.exe and services.exe on Windows) starts system services, runs startup scripts, and eventually launches the login manager or desktop environment.
UEFI vs. BIOS: Key Differences
The firmware standard affects how the boot process works and what features are available:
- Partitioning: BIOS uses MBR partitioning, limited to four primary partitions and 2 TB disks. UEFI uses GPT, supporting many partitions and disks larger than 2 TB.
- Boot method: BIOS reads the first sector (MBR) and executes code there. UEFI reads a file from a FAT-formatted EFI System Partition, which is more flexible and allows signed bootloaders.
- Secure Boot: UEFI can enforce Secure Boot, which verifies the digital signature of the bootloader and kernel to prevent tampering. BIOS has no equivalent.
- Interface: UEFI setup utilities are typically graphical and support mouse input; BIOS setup is text-based.
- Compatibility: UEFI can boot BIOS-style OSes via CSM, but this is being phased out on newer hardware.
Common Boot Problems and What They Mean
When a computer fails to boot, the symptom often points to a specific stage:
- No power, no fans: Check the power supply, power button, and motherboard connections.
- Fans spin but no display: Could be RAM, CPU, or GPU failure. POST beep codes or diagnostic LEDs on the motherboard can help identify the component.
- "No bootable device" or "Operating system not found": The firmware cannot find a bootloader. Causes include a disconnected drive, corrupted boot sector, incorrect boot order, or a failed drive.
- Boot loop or blue screen early in startup: Often a driver or file system corruption. Safe mode or recovery tools may help.
- Stuck on manufacturer logo: The firmware may be waiting for a device or failing to initialize hardware. Clearing CMOS or disconnecting peripherals can sometimes resolve it.
A common misconception is that the operating system starts first. In reality, the firmware runs before any OS code, and the OS depends on the firmware to have initialized the hardware. Another misconception is that the boot process is instant; in reality, each stage takes time, and the total can range from a few seconds on modern SSDs to over a minute on older hardware or with many peripherals.
Speeding Up the Boot Process
Several factors influence boot time, and some can be adjusted:
- Storage type: An SSD reduces the time to read the kernel and system files compared to a mechanical hard drive.
- Firmware settings: Enabling "Fast Boot" in UEFI skips some POST checks and device initialization, at the cost of less thorough hardware testing.
- Startup programs: Many applications launch at login; disabling unnecessary ones shortens the time to a usable desktop.
- Secure Boot and integrity checks: These add a small delay but improve security.
- Peripherals: USB devices and network boot options can add seconds while the firmware probes them.
Frequently Asked Questions
What is the difference between a cold boot and a warm boot?
A cold boot starts from a powered-off state, so the firmware runs a full POST and initializes all hardware. A warm boot (restart) may skip some POST steps and reinitialize less hardware, which is why it is often faster. The exact behavior depends on the firmware and OS.
Why does my computer show a manufacturer logo for a long time?
The firmware is likely waiting for a device to respond, running a thorough POST, or attempting a network boot. Disconnecting unnecessary USB devices, checking the boot order, and disabling network boot in the firmware settings can reduce the delay.
Can a computer boot without a hard drive?
Yes, if it boots from a network (PXE), a USB drive, or an optical disc. The firmware can load a bootloader from these devices, and the operating system can run entirely in memory (a live environment) or access storage over the network.
What does "Secure Boot" do during startup?
Secure Boot verifies the digital signature of the bootloader and, in some configurations, the kernel. If the signature is missing or invalid, the firmware refuses to execute the code, which helps prevent rootkits and other low-level malware from loading before the OS.
Why does the clock reset after booting?
The real-time clock (RTC) is powered by a small battery on the motherboard. If that battery is depleted, the clock loses time when the computer is unplugged, and the firmware may reset settings to defaults. Replacing the battery usually resolves it.
Is it safe to turn off a computer during boot?
Turning off during POST or firmware initialization is generally harmless, but powering off while the OS is loading or writing to disk can corrupt files. It is best to wait until the OS is fully started or use the proper shutdown procedure.