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:
| Feature | BIOS (legacy) | UEFI (modern) |
|---|---|---|
| Partition scheme | MBR (max 2 TB, 4 primary) | GPT (huge disks, 128 partitions) |
| Boot data | Boot sector (first 512 bytes) | EFI System Partition (/boot/efi, FAT32) |
| Secure Boot | No | Yes (signed bootloaders) |
| Interface | 16-bit text | Graphical, 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:
vmlinuzis the compressed kernel image itself - the actual program that becomes "the kernel" once it's running.initramfs(also calledinitrd) is a tiny, temporary filesystem loaded straight into RAM alongside the kernel. Why is it needed at all? Because the kernel might need special drivers just to see the real root filesystem - for example if it's on an LVM volume, a RAID array, or an encrypted disk. Rather than build every possible driver permanently into the kernel, Linux boots into this minimal RAM disk first, loads whatever drivers are needed, mounts the real root filesystem, and then hands off control there. Think of it as a stagehand who sets up the real stage before the actual performance begins.
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).