Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bootloaders: How Linux is Loaded

In this chapter:

  • What a bootloader does and the difference between EFI and Legacy BIOS
  • GRUB 2 — configuration, installation, and common options
  • systemd-boot — EFI-only minimal bootloader setup
  • Limine — modern multiprotocol bootloader with Secure Boot support
  • When to use each bootloader

There are many bootloaders available, but this chapter focuses on three common choices in 2026: GRUB 2, systemd-boot, and Limine.

Rule of thumb: Use GRUB 2 for dual-boot or multiboot setups, and for any system where you want theme support and a boot menu. Use systemd-boot for single-OS EFI systems where you prefer a minimal, fast bootloader without extra packages.

GRUB 2 - The Most Widely Used

GRUB 2 is the most popular bootloader for Linux. It supports themes, multiboot setups, rescue modes, and a wide range of configuration options. For Windows/Linux dual-boot systems, GRUB 2 is the recommended choice.

Resource: GRUB Manual Table of Contents

Configuration

Before installing or updating GRUB, you need to generate configuration files. The authoritative reference is the Gentoo GRUB2 Wiki.

Files Used for Configuration

FileEditablePurpose
/boot/grub/grub.cfgNoGenerated by grub-mkconfig; do not edit directly
/etc/grub.d/*YesScripts processed in numerical order
/etc/default/grubYesPrimary configuration file; start all edits here

Editing GRUB Configuration in /etc/default/grub

Common settings in /etc/default/grub:

  • GRUB_DEFAULT — Default boot entry. 0 selects the first entry, 1 the second, and so on.
  • GRUB_TIMEOUT_STYLEmenu shows the boot menu; hidden skips it (controlled by GRUB_HIDDEN_TIMEOUT).
  • GRUB_TIMEOUT — Seconds to display the menu before auto-booting. -1 waits indefinitely for user input.
  • GRUB_CMDLINE_LINUX_DEFAULT — Kernel options passed on boot. Common values:
    • quiet splash — hides boot output and shows a splash screen
    • nomodeset — disables kernel modesetting; useful for installing NVIDIA drivers
    • single — boots into single-user mode for maintenance or password resets
  • GRUB_DISABLE_RECOVERY — Set to true to hide recovery entries from the menu.

Resource: Full list of GRUB configuration variables

Sample GRUB Configuration (/etc/default/grub)

Example with no boot menu (instant boot to default entry):

GRUB_DEFAULT="0"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="0"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_RECOVERY="true"
GRUB_DISABLE_LINUX_RECOVERY="true"

Make Configuration files

After editing /etc/default/grub, regenerate the main GRUB configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

On Debian-based systems you can also use the shorthand:

update-grub

Installation

Once configuration files are ready, install GRUB onto your disk. First, confirm whether your system uses EFI or Legacy BIOS:

ls /sys/firmware/efi

If the command lists files, you are on EFI. If it errors with “No such file or directory,” you are on Legacy BIOS.

EFI Installation

EFI systems require a dedicated EFI System Partition (ESP) mounted at /boot/efi. Make sure the partition is mounted before running the installer:

grub-install --efi-directory=/boot/efi

BIOS Legacy Installation

Warning: Only use Legacy BIOS installation on hardware that does not support EFI. For all modern hardware, prefer EFI.

On a typical single-drive Legacy setup, run:

grub-install /dev/sda

Replace /dev/sda with your actual target disk. Use lsblk or blkid to identify the correct drive if you are unsure.

For the full grub-install reference: https://www.gnu.org/software/grub/manual/grub/html_node/Installing-GRUB-using-grub_002dinstall.html

GRUB Videos

Systemd Boot - Minimal Built-In boot

Systemd-boot is shipping with more distributions as a lightweight alternative to GRUB for single-OS EFI systems.

Important: systemd-boot is EFI only. Verify before proceeding: ls /sys/firmware/efi

Dual-boot and multiboot setups are possible with systemd-boot, but configuration is more cumbersome than GRUB. For multiboot systems, use GRUB.

Configuraiton

Directory layout for systemd-boot:

PathPurpose
/boot/efiMain EFI directory (sometimes /boot)
/boot/efi/loader/loader.confGlobal loader configuration
/boot/efi/loader/entries/*.confOne file per boot entry

General Configuration

/boot/efi/loader/loader.conf options:

  • default — Default boot entry filename or wildcard (e.g., arch-*.conf)
  • timeout — Seconds to show the menu; omit to show menu only on keypress
  • editoryes (default) allows editing boot entries at startup; set to no on shared or public systems
  • auto-entries1 shows automatic Windows/EFI Shell entries; 0 hides them
  • console-modeauto picks a suitable display mode; max uses the highest available

Example /boot/efi/loader/loader.conf:

default  arch.conf
timeout  4
console-mode max
editor   no

Adding Boot Entries

Each file in /boot/efi/loader/entries/ defines one boot entry.

Key fields:

  • title — OS name displayed in the menu (required)
  • linux — Path to the kernel image (required unless using efi)
  • initrd — Path to initramfs and optional CPU microcode images
  • options — Kernel parameters; root= is required for Linux

To find the UUID of your root partition:

sudo blkid

Example Arch Linux entry /boot/efi/loader/entries/arch.conf:

title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options root="LABEL=arch" rw

Example Windows 10 entry /boot/efi/loader/entries/win10.conf:

title Windows 10
efi /EFI/Microsoft/Boot/bootmgfw.efi

Resource: All kernel parameters reference

Installation

Install systemd-boot with:

bootctl install

To update after adding new entries manually:

bootctl update

Limine - Modern Multiprotocol Bootloader

Limine is a modern, advanced, multiprotocol bootloader and boot manager that has become more popular in 2026, including as a default in distributions such as CachyOS and Omarchy.

Compared with GRUB and systemd-boot, Limine is often chosen for modern setups that want clean configuration, broad protocol support, and strong Secure Boot and measured boot capabilities.

Configuration

Limine uses a plain-text configuration file named limine.conf.

Common config file locations (from the Limine docs):

  • On EFI, Limine first checks for limine.conf next to the EFI executable.
  • If not found there (or on BIOS), it scans standard paths such as /boot/limine/limine.conf and /limine.conf.

Basic limine.conf Structure

The config contains:

  • Global options like timeout: and default_entry:
  • Menu entries beginning with /Entry Name
  • Per-entry options like protocol:, path:, and cmdline:

Example Linux entry:

timeout: 5
default_entry: 1

/Linux
protocol: linux
path: boot():/vmlinuz-linux
module_path: boot():/initramfs-linux.img
cmdline: root=UUID=REPLACE_WITH_ROOT_UUID rw quiet

Important syntax notes:

  • Limine options use name: value format.
  • Menu entries begin with / and can be nested using additional / characters.
  • boot():/ points to the partition containing limine.conf; if your kernel/initramfs live on a different partition, use uuid(<PARTUUID>):/path (as documented on Arch Wiki).
  • In Secure Boot mode, Limine enforces stronger integrity checks; see CONFIG.md for file-hash requirements and editor restrictions.

Installation

Limine installation differs from distro to distro. In general:

  1. Install the limine package from your distribution or use official release binaries.
  2. Place Limine files on the target disk/ESP according to the official usage docs.
  3. Create or update limine.conf.
  4. Reboot and validate boot entries.

For exact, up-to-date commands, follow:

Tip: If you need traditional Linux/Windows dual-boot convenience and broad distro documentation, GRUB is still usually easier. If you want a modern boot manager with a clean config model and strong Secure Boot features, Limine is an excellent option.

Chapter Summary

  • GRUB 2 is the most widely used bootloader. Configuration lives in /etc/default/grub; changes take effect after running grub-mkconfig or update-grub.
  • GRUB supports EFI and Legacy BIOS installations, themes, multiboot menus, and rescue modes.
  • systemd-boot is a lightweight EFI-only alternative. It is simpler but less flexible than GRUB for multi-OS setups.
  • Limine is a modern multiprotocol bootloader with growing adoption, clean configuration, and strong Secure Boot/measured boot support.
  • Always prefer EFI over Legacy BIOS on modern hardware.
Last change: