Difference between revisions of "Systemd-boot"

From ArchWiki
Jump to: navigation, search
m (efibootmgr -w is useless)
m (efibootmgr supports / now)
Line 87: Line 87:
==== Manual entry using efibootmgr ====
==== Manual entry using efibootmgr ====
If {{ic|gummiboot install}} command failed you can create a EFI boot entry manually with {{ic|efibootmgr}} utility:
If {{ic|gummiboot install}} command failed you can create a EFI boot entry manually with {{ic|efibootmgr}} utility:
  # efibootmgr -c -d /dev/sdX -p Y -l '\EFI\gummiboot\gummibootx64.efi' -L "Gummiboot"
  # efibootmgr -c -d /dev/sdX -p Y -l /EFI/gummiboot/gummibootx64.efi -L "Gummiboot"

Revision as of 06:05, 18 September 2013

Gummiboot is a UEFI boot loader written by Kay Sievers and Harald Hoyer. It is simple to configure, but can only start EFI executables, the Linux kernel (with CONFIG_EFI_STUB enabled), grub.efi, and such.


Install gummiboot and run the following to install gummiboot as your bootloader:

# gummiboot install

This will automatically copy the gummiboot binary to your EFI System Partition and create a boot entry in the EFI Boot Manager. If you are not booted via EFI, creating the boot entry will fail. You should however still be able to boot gummiboot as it copies the binary to the default EFI binary location on your ESP (/boot/EFI/Boot/BOOTX64.EFI on x64 systems). Note that the installation process has to be done only once, updating will happen automatically by the post_install script of gummiboot during package updates.

  • The gummiboot command assumes that your EFI System Partition is mounted on /boot. If your ESP is mounted on /boot/efi you have to call the following gummiboot install command with the additional --path switch. This also means that gummiboot will not be able to update itself automatically and you will have to call gummiboot --path=/boot/efi update after every package update. Additionally you will have to make sure that the kernel and initramfs are copied onto the ESP as gummiboot can't load EFI binaries from other partitions. It is therefore strongly recommended to mount your ESP to /boot if you use gummiboot. The rest of this article will assume that your ESP is mounted on /boot.
  • If gummiboot fails to create a boot entry, check whether all the conditions mentioned here are met.


The basic configuration is kept in /boot/loader/loader.conf, with just two possible configuration options:

  • default – default entry to select (without the .conf suffix); can be a wildcard like arch-*
  • timeout – menu timeout in seconds. If this is not set, the menu will only be shown when you hold the space key while booting.


default  arch
timeout  4

Note that both options can be changed in the boot menu itself, which will store them as EFI variables.

Adding boot entries

Gummiboot searches for boot menu items in /boot/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 (/boot); e.g. /vmlinuz-linux. Either this or linux (see below) is required.
  • options – Command-line options to pass to the EFI program. Optional, but you will need at least initrd=efipath and root=dev if 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.

An example entry for Arch Linux:

title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img
options        root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 rw

Please note in the example above that PARTUUID/PARTLABEL identifies a GPT partition, and differs from UUID/LABEL, which identifies a filesystem. Using the PARTUUID/PARTLABEL is advantageous because it is invariant if you reformat the partition with another filesystem. It's also useful if you don't have a filesystem on the partition (or use LUKS, which doesn't support LABELs).

You can also add other EFI programs such as \EFI\arch\grub.efi.

Note: Gummiboot will automatically check for binaries of a Windows Installation (\EFI\Microsoft\Boot\Bootmgfw.efi) or a UEFI Shell (\shellx64.efi) and display entries for them, so you don't have to create these manually.

Inside the boot menu


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/T - adjust the timeout (stored in a non-volatile EFI variable)
  • e - edit the kernel command line
  • q - quit
  • v - show the gummiboot and UEFI version
  • p - print the current configuration
  • h - show key mapping

These hotkeys will, when pressed inside the menu or during bootup, directly boot a specific entry:

  • l - Linux
  • w - Windows
  • a - OS X
  • s - EFI Shell
  • 1-9 - number of entry


Manual entry using efibootmgr

If gummiboot install command failed you can create a EFI boot entry manually with efibootmgr utility:

# efibootmgr -c -d /dev/sdX -p Y -l /EFI/gummiboot/gummibootx64.efi -L "Gummiboot"