LinuxCommandLibrary

bootctl

Manage the systemd boot loader

TLDR

Show information about the system firmware and the bootloaders

$ bootctl
copy

Show all available bootloader entries
$ bootctl list
copy

Set a flag to boot into the system firmware on the next boot (similar to sudo systemctl reboot --firmware-setup)
$ sudo bootctl reboot-to-firmware true
copy

Specify the path to the EFI system partition (defaults to /efi/, /boot/ or /boot/efi)
$ bootctl --esp-path /[path/to/efi_system_partition]/
copy

Install systemd-boot into the EFI system partition
$ sudo bootctl install
copy

Remove all installed versions of systemd-boot from the EFI system partition
$ sudo bootctl remove
copy

SYNOPSIS

bootctl [OPTIONS...] COMMAND [ARGUMENTS...]

PARAMETERS

status
    Show current status of the boot loader and its entries.

install
    Install systemd-boot into the EFI System Partition (ESP).

update
    Update systemd-boot files on the ESP.

remove
    Uninstall systemd-boot from the ESP.

list
    List available boot entries and their details.

set-default ID
    Set the default boot entry using its unique ID.

set-oneshot ID
    Set the default boot entry for the next boot only.

set-timeout SECONDS
    Set the boot loader menu timeout in seconds.

set-theme THEME
    Set the boot loader theme for systemd-boot.

set-boot-vga MODE
    Set the VGA mode for the boot loader display.

random-seed
    Generate and save a random seed for early boot entropy.

reboot-to-firmware
    Schedule the next reboot to enter the system's firmware setup (BIOS/UEFI).

--boot-path=PATH
    Override the default path to the boot partition.

--esp-path=PATH
    Override the default path to the EFI System Partition (ESP).

--graceful
    Do not fail if the boot loader is not installed or configured.

--json=MODE
    Output information in JSON format (e.g., short, pretty, oneline).

--version
    Show package version.

--help
    Display a help message and exit.

DESCRIPTION

bootctl is a command-line utility used to inspect, manage, and configure the systemd-boot boot manager (formerly gummiboot) or the U-Boot EFI boot manager.

It's primarily used in systems that boot via UEFI firmware, where systemd-boot is responsible for loading the kernel and initial ramdisk. bootctl allows users to install the boot loader to the EFI System Partition (ESP), update its files, list available boot entries, set the default boot entry, configure the boot timeout, and manage other boot-related settings. It integrates tightly with systemd and provides a simple, unified way to manage boot options on supported systems.

CAVEATS

bootctl is specifically designed for UEFI-based systems and manages either systemd-boot or U-Boot EFI boot managers. It does not manage other boot loaders like GRUB or SYSLINUX.

Operations that modify the EFI System Partition (like `install`, `update`, `remove`) typically require root privileges.

EFI SYSTEM PARTITION (ESP) DEPENDENCY

All bootctl operations, especially those involving installation or updates, heavily rely on the presence and correct mounting of the EFI System Partition (ESP). The ESP is a FAT-formatted partition on the boot disk that stores the UEFI boot loaders and configuration files. It is typically mounted at `/boot` or `/efi`.

CONFIGURATION FILES

While bootctl provides a high-level interface, systemd-boot's behavior is primarily controlled by configuration files located on the ESP. The main configuration is `loader.conf`, and individual boot entries are defined in `entries/*.conf` files. Direct editing of these files is an alternative to using bootctl for certain configurations.

HISTORY

bootctl is an integral part of the systemd project, designed to manage systemd-boot, which was originally known as gummiboot. gummiboot was a lightweight EFI boot manager developed by Lennart Poettering and Kay Sievers. In 2013, gummiboot was merged into the systemd project itself, and subsequently renamed systemd-boot. bootctl was introduced as the primary command-line interface to simplify the installation, configuration, and management of this boot loader, aligning with systemd's philosophy of providing unified utilities.

SEE ALSO

systemd-boot(7), loader.conf(5), loader.conf.d(5), boot(7), efibootmgr(8)

Copied to clipboard