Modern Linux systems booting under Unified Extensible Firmware Interface (UEFI) increasingly rely on systemd-boot (formerly Gummiboot) instead of complex legacy bootloaders like GRUB. Designed to be lightweight and simple, systemd-boot executes kernel EFI stubs directly without parsing intricate configuration scripts or loading extraneous filesystem drivers. The bootctl command-line tool serves as the primary control interface for checking firmware state, validating EFI System Partitions (ESP), and managing boot entries on Linux systems.
What Is bootctl and When Should You Use It?
Located in /usr/bin/bootctl, this utility interacts with the kernel’s efivarfs interface and systemd-boot binaries:
- UEFI Firmware Inspection: Reports whether firmware supports Secure Boot, firmware setup rebooting, and UEFI runtime variables.
- ESP and XBOOTLDR Validation: Detects and verifies the mounted EFI System Partition (e.g.
/bootor/efi) for valid FAT32 filesystem structures. - Boot Entry Management: Lists all installed boot configurations, default kernel targets, and fallback entries.
- Bootloader Updates: Installs, updates, or removes systemd-boot EFI binaries directly into the ESP.
Inspecting Current Bootloader and Firmware Status
To inspect overall boot environment telemetry, run bootctl with administrative privileges:
sudo bootctl status
The command outputs comprehensive system information divided into distinct sections:
- System: Shows firmware vendor, architecture (e.g. x86-64), Secure Boot state (enabled or disabled), and TPM2 support.
- Current Boot Loader: Identifies the active bootloader (systemd-boot version and features).
- Boot Loader Entries: Lists the default kernel configuration, timeout settings, and available operating system entries.
Listing Available Boot Entries
To inspect all configured kernel entries installed in your EFI partition:
bootctl list
Each boot entry displays its unique identifier (e.g. arch.conf or linux-lts.conf), title, Linux kernel binary path, initial ramdisk (initrd) paths, and appended kernel command-line options.
Setting Default Boot Targets and Bootloader Timeouts
You can adjust boot selection preferences without manually editing text files:
1. Setting a One-Time Next Boot Target
To reboot into a specific recovery kernel or alternative distribution for a single reboot only:
sudo bootctl set-oneshot arch-fallback.conf
Upon subsequent reboots, the system automatically reverts to your regular default boot target.
2. Setting the Permanent Default Entry
sudo bootctl set-default arch.conf
3. Adjusting the Boot Selection Menu Timeout
To set a 5-second selection countdown before the default kernel boots automatically:
sudo bootctl set-timeout 5
To make the boot menu visible indefinitely until you press Enter, pass menu-force.
Installing and Updating systemd-boot Binaries
When upgrading system packages or setting up a newly partitioned drive, keep your EFI binaries synchronized:
# Update existing EFI bootloader files in the ESP
sudo bootctl update
# Install systemd-boot on a fresh EFI System Partition
sudo bootctl install
If you need to verify whether the EFI files on disk match the latest distribution packages:
bootctl is-installed