BIOS vs UEFI: What's the Difference?

BIOS vs UEFI: What's the Difference?

Before your computer loads Linux, it runs firmware: the lowest-level software on the machine, baked into a chip on the motherboard. For decades this firmware was BIOS. Since roughly 2010-2012, UEFI has replaced it on most new computers. The distinction matters for how you install Linux, how the bootloader works, and features like Secure Boot.

What firmware does

When you press the power button:

  1. The CPU starts executing code from a fixed address in ROM
  2. The firmware (BIOS or UEFI) initializes hardware: RAM, CPU, storage controllers, display
  3. The firmware finds a bootable device and loads the bootloader from it
  4. The bootloader (usually GRUB on Linux) loads the Linux kernel
  5. The kernel takes over and starts the OS

BIOS and UEFI both perform steps 1-3, but they do it differently and have different capabilities.

BIOS

BIOS (Basic Input/Output System) dates to the original IBM PC (1981). The interface is a simple text menu — no mouse, arrow keys only. It initializes hardware serially (one device at a time), which is one reason older computers took longer to boot.

MBR: the BIOS partition scheme

BIOS systems use MBR (Master Boot Record) partitioning. The first 512 bytes of a disk contain the partition table and the boot code. Limitations:

  • Maximum disk size: 2TB
  • Maximum 4 primary partitions (or 3 primary + 1 extended, which can contain many logical partitions)
  • No redundancy: if the MBR sector is corrupted, the disk is unbootable
  • GRUB installs into the MBR or a small (1MB) “BIOS boot” partition
# Check if a disk uses MBR or GPT
sudo fdisk -l /dev/sda | head -3
# Disk /dev/sda: 500 GiB...
# Disklabel type: dos    <- MBR
# or
# Disklabel type: gpt    <- GPT

# Another way
sudo parted /dev/sda print | grep "Partition Table"
# Partition Table: msdos   <- MBR
# Partition Table: gpt     <- GPT

# Check if currently booted in BIOS or UEFI mode
ls /sys/firmware/efi 2>/dev/null && echo "UEFI" || echo "BIOS/Legacy"

UEFI

UEFI (Unified Extensible Firmware Interface) was developed by Intel and is now a specification maintained by the UEFI Forum. It was designed to address BIOS limitations and support modern hardware.

Key UEFI features

GPT support: UEFI uses GPT (GUID Partition Table), which supports disks up to 9.4ZB (zettabytes) and up to 128 partitions. The partition table is stored at both the start and end of the disk for redundancy.

Faster boot: UEFI can initialize hardware in parallel rather than serially, which is one contributor to faster boot times. Combined with NVMe SSDs, modern UEFI systems can reach the login screen in seconds.

Secure Boot: UEFI includes a key database that can verify the cryptographic signature of bootloaders before running them. This prevents certain classes of bootkit malware from loading before the OS. See the Secure Boot article for details.

EFI System Partition: UEFI defines a standard partition (FAT32 formatted) where bootloaders live. Each OS installs its bootloader into its own subdirectory of this partition.

Graphical interface: UEFI firmware often provides a graphical setup interface with mouse support, though some use text interfaces by choice.

# On a running UEFI Linux system:

# Verify UEFI mode
ls /sys/firmware/efi
# If this directory exists, you are in UEFI mode

# View UEFI boot entries
efibootmgr -v
# BootCurrent: 0001
# BootOrder: 0001,0002,0000
# Boot0000* Windows Boot Manager  HD(...)/EFI/Microsoft/Boot/bootmgfw.efi
# Boot0001* ubuntu                HD(...)/EFI/ubuntu/shimx64.efi
# Boot0002* UEFI: USB Drive       ...

# Check the EFI System Partition
df -h /boot/efi
# Filesystem      Size  Used Avail Use% Mounted on
# /dev/sda1       511M   30M  482M   6% /boot/efi

ls /boot/efi/EFI/
# BOOT  ubuntu  Microsoft   <- each OS has its own directory

The EFI System Partition layout

/boot/efi/
  EFI/
    BOOT/
      BOOTX64.EFI         <- fallback bootloader (used if no boot entry exists)
    ubuntu/
      grubx64.efi         <- GRUB for Ubuntu/Linux
      shimx64.efi         <- Secure Boot shim
      grub.cfg
    Microsoft/
      Boot/
        bootmgfw.efi      <- Windows Boot Manager
    fedora/
      shim.efi            <- Fedora's Secure Boot shim
      grubx64.efi

Each operating system manages its own subdirectory. On a dual-boot system, both Windows and Linux bootloaders coexist here without conflict.

How to check which firmware your computer uses

# Method 1: Check for the EFI directory (most reliable on Linux)
[ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS/Legacy"

# Method 2: bootctl (systemd)
bootctl status 2>/dev/null | grep "Firmware"
# Firmware: UEFI 2.70 (American Megatrends 5.20)
# or
# System: No EFI system found

# Method 3: dmidecode (requires root, shows detailed firmware info)
sudo dmidecode -t 0 | grep -E "Version|Vendor"
# Vendor: American Megatrends Inc.
# Version: F10

# On Windows: Win+R -> msinfo32 -> look for "BIOS Mode"
# Shows "UEFI" or "Legacy"

UEFI settings that affect Linux installation

Secure Boot

Secure Boot verifies that the bootloader is cryptographically signed by a trusted key. Most major Linux distributions (Ubuntu, Fedora, openSUSE) ship with a Microsoft-signed shim bootloader that passes Secure Boot. Some distributions (older Arch, Gentoo, custom setups) require Secure Boot to be disabled.

# Check Secure Boot status
mokutil --sb-state
# SecureBoot enabled    <- Secure Boot is on
# or
# SecureBoot disabled

# If you need to disable it: enter UEFI setup at startup
# (usually Del, F2, or F10), find Security -> Secure Boot -> Disable

CSM / Legacy Boot

CSM (Compatibility Support Module) emulates BIOS behavior inside a UEFI firmware. If you are installing a modern Linux distribution, CSM should be disabled — it can interfere with Secure Boot and produce duplicate or confusing boot entries.

# If your installer shows "Legacy" or "BIOS-compatibility" mode
# unexpectedly, check your UEFI settings for CSM and disable it
# then re-run the installer

# After disabling CSM, you may need to re-create the USB with
# GPT/UEFI mode selected in Rufus (on Windows) or re-write with dd

Boot order and the UEFI boot manager

# View current boot entries and order
efibootmgr
# BootCurrent: 0001
# BootOrder: 0001,0000,0002
# Boot0000* UEFI: USB Drive
# Boot0001* ubuntu
# Boot0002* Windows Boot Manager

# Change the boot order (put ubuntu first)
sudo efibootmgr --bootorder 0001,0002,0000

# Add a boot entry manually (rarely needed; installers do this)
sudo efibootmgr --create \
  --disk /dev/sda \
  --part 1 \
  --label "Ubuntu" \
  --loader /EFI/ubuntu/shimx64.efi

# Delete a boot entry
sudo efibootmgr --delete-bootnum --bootnum 0003

Impact on Linux installation

When you boot the Linux installer, it detects the firmware mode and adjusts accordingly:

On UEFI systems, the installer will:

  • Detect or create an EFI System Partition (FAT32, at least 512MB, mounted at /boot/efi)
  • Install GRUB as an EFI application (grubx64.efi)
  • Register a UEFI boot entry via efibootmgr

On BIOS systems, the installer will:

  • Use MBR partition scheme
  • Install GRUB to the MBR (first 512 bytes of the disk) or a 1MB BIOS boot partition
  • No EFI System Partition is needed or created

The key practical point: modern computers are UEFI. If you are installing Linux on a computer made in the last decade, you are almost certainly on UEFI hardware, and the installer will handle everything correctly as long as CSM is disabled and you booted the USB in UEFI mode.

Frequently Asked Questions

What is the difference between BIOS and UEFI?

BIOS (Basic Input/Output System) is the legacy firmware interface found on computers made before roughly 2010-2012. It initializes hardware at boot, presents a simple text-based setup menu, and uses the MBR (Master Boot Record) partition scheme, which limits disks to 2TB and 4 primary partitions. UEFI (Unified Extensible Firmware Interface) is the modern replacement. It supports GPT (GUID Partition Table) disks larger than 2TB with up to 128 partitions, provides faster boot times through parallelized hardware initialization, supports Secure Boot to verify bootloader signatures, has a graphical setup interface with mouse support, and has a dedicated EFI System Partition (ESP) where bootloaders are stored. Nearly all computers made after 2012 use UEFI.

How do I know if my computer uses BIOS or UEFI?

On Linux, the easiest check is: ls /sys/firmware/efi — if this directory exists, you are running in UEFI mode; if the command returns “No such file or directory,” you are in BIOS/legacy mode. You can also run systemd-detect-virt —firmware to get an explicit answer, or bootctl status which shows the firmware type at the top. On Windows, open System Information (msinfo32) and look for “BIOS Mode” in the right panel — it will say either “UEFI” or “Legacy.” You can also check at startup: if you see a graphical firmware interface with mouse support, it is UEFI; a text-only interface with no mouse is BIOS (though some UEFI firmware uses a text interface by choice).

Does it matter whether I use BIOS or UEFI when installing Linux?

Yes, it affects partitioning and bootloader setup. On UEFI systems, Linux needs an EFI System Partition (ESP) formatted as FAT32, typically 512MB, mounted at /boot/efi. The bootloader (usually GRUB) installs into this partition as an .efi file. On BIOS systems, the partition scheme is MBR and GRUB installs to the first 512 bytes of the disk (the MBR itself) or a small “BIOS boot” partition. Most Linux installers detect the firmware type automatically and set up the correct layout without manual intervention. Problems arise when you try to mix: installing a UEFI Linux alongside a BIOS Windows, or vice versa, creates complications because the bootloader architectures are incompatible.

What is the EFI System Partition?

The EFI System Partition (ESP) is a FAT32 partition that exists on every UEFI-booted system. It is the standardized location where UEFI firmware looks for bootloaders. Each operating system stores its bootloader in a subdirectory of the ESP: Windows stores it at EFI/Microsoft/Boot/bootmgfw.efi, GRUB (for Linux) stores it at EFI/ubuntu/grubx64.efi or similar. The UEFI firmware keeps a boot entry list (viewable with efibootmgr) pointing to the bootloaders in the ESP. This design means multiple operating systems can coexist without overwriting each other’s bootloaders — each OS has its own subdirectory in the ESP and its own boot entry. The ESP is usually 100MB-512MB and mounted at /boot/efi on Linux.

What is Legacy Boot / CSM mode?

CSM (Compatibility Support Module) is a UEFI feature that emulates BIOS behavior to support older operating systems and bootloaders that do not understand UEFI. When CSM is enabled, the firmware can boot from MBR disks using legacy bootloaders. Many UEFI machines shipped with CSM enabled by default to maintain compatibility with Windows 7 and older Linux installers. CSM mode is sometimes called “Legacy Boot” in firmware settings. Modern Linux distributions all support native UEFI boot and do not need CSM. If you are installing a current Linux distribution (Ubuntu 22.04+, Fedora 38+, Debian 12+), CSM should be disabled for a clean UEFI installation. CSM can interfere with Secure Boot and sometimes causes boot menu entries to behave unpredictably.

Should I use GPT or MBR partitioning?

Use GPT on any computer with UEFI firmware, which means essentially any computer made after 2012. GPT supports disks larger than 2TB, allows up to 128 primary partitions, stores partition table data redundantly (at both the start and end of the disk), and is required for UEFI native boot. MBR is the legacy partition scheme used with BIOS firmware. It limits disks to 2TB, supports only 4 primary partitions (or 3 primary + 1 extended that contains logical partitions), and stores partition table data only in the first 512 bytes of the disk with no redundancy. If you have a BIOS machine and are installing on a disk smaller than 2TB, MBR is fine. For any new installation on UEFI hardware, use GPT.