Home > Package & System Management > systemd-bootctl

systemd-bootctl: Managing the systemd-boot Bootloader

systemd-bootctl is a utility for managing the systemd-boot bootloader on UEFI systems. It is responsible for installing, updating, removing the bootloader, and configuring boot entries, primarily by directly accessing the EFI System Partition (ESP).

Overview

As part of the systemd project, systemd-bootctl controls systemd-boot (formerly gummiboot), a simple boot manager for UEFI firmware-based systems. It is used to install the bootloader on the EFI System Partition (ESP), manage boot entries, and check the status of the bootloader.

Key Features

The core features provided by systemd-bootctl include:

  • Installation and update of the systemd-boot bootloader
  • Management of boot entries (default, one-shot boot configuration)
  • Checking the status of the bootloader and boot entries
  • Direct operation on the EFI System Partition (ESP)

Main Options (Sub-commands)

systemd-bootctl primarily performs its functions through sub-commands.

Bootloader Management

Boot Entry Configuration

Generated command:

Try combining the commands.

Description:

`systemd-bootctl` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

Common usage examples for systemd-bootctl.

Install systemd-boot

sudo bootctl install

Installs systemd-boot onto the EFI System Partition (ESP).

Check bootloader status

bootctl status

Checks the current status of systemd-boot and boot entry information.

Set default boot entry

sudo bootctl set-default arch.conf

Sets the 'arch.conf' boot entry as the default from now on.

Boot specific entry once

sudo bootctl set-oneshot rescue.conf

Configures to boot with the 'rescue.conf' entry only for the next boot.

Update bootloader

sudo bootctl update

Updates the installed systemd-boot to the latest version.

Tips & Precautions

systemd-bootctl directly affects the system's boot process, so extreme caution is advised when using it.

Important Usage Guidelines

  • Always execute with root privileges (sudo).
  • Ensure the EFI System Partition (ESP) is correctly mounted. It is typically mounted at /boot or /efi.
  • Boot entry IDs are usually the part of the .conf file name excluding the extension (e.g., arch.conf -> arch).
  • Incorrect usage can lead to an unbootable system, so understand thoroughly and use with care before executing commands.

Terminology

  • EFI System Partition (ESP): A FAT32 formatted partition that UEFI firmware uses to locate bootloaders and boot-related files. It is essential for system booting.
  • systemd-boot: A simple and fast boot manager for UEFI systems. It primarily boots by directly loading kernel images and initramfs.


Same category commands