BIOS vs UEFI & the Boot Chain

BIOS vs UEFI

Scenario: You press the power button. Before Linux, before the login prompt, before you even see a spinning logo, something has to find a disk, find a program on that disk, and start running it. That "something" is firmware - code baked into the motherboard itself, running before any operating system exists.

There are two generations of this firmware, and you'll meet both in the real world:

FeatureBIOS (legacy)UEFI (modern)
Partition schemeMBR (max 2 TB, 4 primary)GPT (huge disks, 128 partitions)
Boot dataBoot sector (first 512 bytes)EFI System Partition (/boot/efi, FAT32)
Secure BootNoYes (signed bootloaders)
Interface16-bit textGraphical, mouse, network

BIOS is the older approach: it reads the very first 512 bytes of a disk (the "boot sector") and blindly runs whatever code is there. That worked for decades, but it also caps how large a partition table can describe (2 TB) and how many primary partitions you can have (4). UEFI replaces that with a real filesystem - a small FAT32 partition called the EFI System Partition that holds actual bootloader files, and a partition table format (GPT) with no practical size limit. UEFI can also verify that the bootloader hasn't been tampered with before running it (Secure Boot), something BIOS has no concept of.

Once firmware finds a bootloader, here's the handoff that gets you to a login prompt, on a modern UEFI + systemd machine:

Firmware (UEFI) → GRUB2 → vmlinuz (kernel) + initramfs → systemd (PID 1) → targets

Two pieces of that chain deserve a plain-language explanation:

Tip: Not sure which firmware mode a running machine booted in? Check whether /sys/firmware/efi exists - if that directory is present, you're on UEFI. If it's missing, you booted via legacy BIOS (even on hardware that supports UEFI, since it can usually be configured either way).