systemd-boot, previously called gummiboot, is a simple UEFI boot manager which executes configured EFI images. The default entry is selected by a configured pattern (glob) or an on-screen menu. It is included with, which is installed on Arch system by default.
It is simple to configure but it can only start EFI executables such as the Linux kernel EFISTUB, UEFI Shell, GRUB, the Windows Boot Manager.
- 1 Installation
- 2 Configuration
- 3 Keys inside the boot menu
- 4 Troubleshooting
- 5 See also
Installing the EFI boot loader
To install the systemd-boot EFI boot loader, first make sure the system has booted in UEFI mode and that UEFI variables are accessible. This can be checked by running the command
It should be noted that systemd-boot is only able to load the EFISTUB kernel from the EFI System Partition (ESP). To keep the kernel updated it is simpler and therefore recommended to mount the ESP to
/boot. If the ESP is not mounted to
/boot, the kernel and initramfs must be copied onto that ESP. This process can be automated by watching kernel files for change using some systemd units as proposed in EFI System Partition#Using systemd.
esp will be used throughout this page to denote the ESP mountpoint, i.e.
With the ESP mounted to
esp, use to install systemd-boot into the EFI system partition by running:
# bootctl --path=esp install
This will copy the systemd-boot boot loader to the EFI partition: on a x64 architecture system the two identical binaries
esp/EFI/Boot/BOOTX64.EFI will be transferred to the ESP. It will then set systemd-boot as the default EFI application (default boot entry) loaded by the EFI Boot Manager.
Then, go to the #Configuration section: the loader must be configured and boot entries added for systemd-boot to function properly at boot time.
Updating the EFI boot loader
Whenever there is a new version of systemd-boot, the boot loader must be updated by the user. This can be performed manually or the update can be automatically triggered using pacman hooks. The two approaches are described thereafter.
bootctl must be used to update systemd-boot. If the
path parameter is not specified,
/boot/efi are checked in turn.
# bootctl update
If the ESP is mounted on a different location, the
path option can be passed as follows:
# bootctl --path=esp update
bootctl --path=esp install.
Alternatively, place the following pacman hook in the
[Trigger] Type = Package Operation = Upgrade Target = systemd [Action] Description = Updating systemd-boot... When = PostTransaction Exec = /usr/bin/bootctl update
The loader configuration is stored in the file
esp/loader/loader.conf and it is composed of the following options:
default– default entry to select (without the .conf suffix); can be a wildcard like
timeout– menu timeout in seconds. If this is not set, the menu will only be shown on
Spacekey (or most other keys actually work too) press during boot.
editor– whether to enable the kernel parameters editor or not.
1(default) is enabled,
0is disabled; since the user can add
init=/bin/bashto bypass root password and gain root access, it is strongly recommended to set this option to
Additional options available starting with systemd v239:
auto-entries(boolean, default is
1) – shows automatic entries for Windows, EFI Shell, and Default Loader;
auto-firmware(boolean, default is
1) – shows entry for rebooting into UEFI firmware settings;
console-mode(int/enum, default is
keep) – changes UEFI console mode:
2and above for vendor modes,
autofor reasonable available mode,
maxfor highest available mode,
keepto do nothing.
default arch timeout 4 editor 0
Adding boot entries
- bootctl will automatically check at boot time for "Windows Boot Manager" (
\EFI\Microsoft\Boot\Bootmgfw.efi), "EFI Shell" (
\shellx64.efi) and "EFI Default Loader" (
\EFI\Boot\bootx64.efi), as well as specially prepared kernel files found in
\EFI\Linux. When detected, corresponding entries with titles
auto-efi-default, respectively, will be automatically generated. These entries do not require manual loader configuration. However, it does not auto-detect other EFI applications (unlike rEFInd), so for booting the Linux kernel, manual configuration entries must be created.
- If you dual-boot Windows, it is strongly recommended to disable its default Fast Start-Up option.
- Remember to load the intel microcode with
initrdif applicable, an example is provided in Microcode#systemd-boot.
- The root partition can be identified with its
PARTUUID. The latter can be found with the command
blkid -s PARTUUID -o value /dev/sdxY, where
xis the device letter and
Yis the partition number. This is required only to identify the root partition, not the
bootctl searches for boot menu items in
esp/loader/entries/*.conf – each file found must contain exactly one boot entry. The possible options are:
title– operating system name. Required.
version– kernel version, shown only when multiple entries with same title exist. Optional.
machine-id– machine identifier from
/etc/machine-id, shown only when multiple entries with same title and version exist. Optional.
efi– EFI program to start, relative to your ESP (
/vmlinuz-linux. Either this or
linux(see below) is required.
options– command line options to pass to the EFI program or kernel parameters. Optional, but you will need at least
root=devif booting Linux.
For Linux, you can specify
linux path-to-vmlinuz and
initrd path-to-initramfs; this will be automatically translated to
efi path and
options initrd=path – this syntax is only supported for convenience and has no differences in function.
EFI Shells or other EFI apps
In case you installed EFI shells and other EFI application into the ESP, you can use the following snippets:
title UEFI Shell x86_64 v1 efi /EFI/shellx64_v1.efi
title UEFI Shell x86_64 v2 efi /EFI/shellx64_v2.efi
Preparing kernels for EFI\Linux
EFI\Linux is searched for specially prepared kernel files, which bundle the kernel, the initrd, the kernel command line and
/etc/os-release into one file. This file can be easily signed for secure boot.
systemd-bootrequires that the
os-releasefile contain either
BUILD_IDto generate an ID and automatically add the entry, which the Arch
os-releasedoes not. Either maintain your own copy with one of them, or make your bundling script generate it automatically.
Put the kernel command line you want to use in a file, and create the bundle file like this:
Kernel packaging command:
objcopy \ --add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \ --add-section .cmdline="kernel-command-line.txt" --change-section-vma .cmdline=0x30000 \ --add-section .linux="vmlinuz-file" --change-section-vma .linux=0x40000 \ --add-section .initrd="initrd-file" --change-section-vma .initrd=0x3000000 \ "/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "linux.efi"
Optionally sign linux.efi now (e.g. using sbsigntools from AUR).
Copying linux.efi into
Kernel parameters editor with password protection
Alternatively you can install
password basic configuration option. Use
sbpctl generate to generate a value for this option.
Install systemd-boot-password with the following command:
# sbpctl install esp
With enabled editor you will be prompted for your password before you can edit kernel parameters.
The following keys are used inside the menu:
Up/Down- select entry
Enter- boot the selected entry
d- select the default entry to boot (stored in a non-volatile EFI variable)
-/T- decrease the timeout (stored in a non-volatile EFI variable)
+/t- increase the timeout (stored in a non-volatile EFI variable)
e- edit the kernel command line. It has no effect if the
editorconfig option is set to
v- show the gummiboot and UEFI version
P- print the current configuration
These hotkeys will, when pressed inside the menu or during bootup, directly boot a specific entry:
a- OS X
s- EFI Shell
1-9- number of entry
Installing after BIOS boot
If booted in BIOS mode, you can still install systemd-boot, however this process requires you to tell firmware to launch systemd-boot's EFI file at boot, usually via two ways:
- you have a working EFI Shell somewhere else.
- your firmware interface provides a way of properly setting the EFI file that needs to be loaded at boot time.
If you can do it, the installation is easier: go into your EFI Shell or your firmware configuration interface and change your machine's default EFI file to
esp/EFI/systemd/systemd-bootx64.efi ( or
systemd-bootia32.efi depending if your system firmware is 32 bit).
Manual entry using efibootmgr
bootctl install command failed, you can create a EFI boot entry manually using :
# efibootmgr -c -d /dev/sdX -p Y -l "\EFI\systemd\systemd-bootx64.efi" -L "Linux Boot Manager"
/dev/sdXY is the EFI System Partition.
\) as the separator