Difference between revisions of "Systemd-boot"
m (switch to sysfs-efivars before running efibootmgr)
|Line 1:||Line 1:|
[http://freedesktop.org/wiki/Software/gummiboot Gummiboot] is
[http://freedesktop.org/wiki/Software/gummiboot Gummiboot] is 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.
== Installing ==
== Installing ==
Revision as of 20:45, 2 September 2013
Gummiboot is an 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.
efivarfssupport in the kernel and requires it to be mounted at
/sys/firmware/efi/efivars. Mounting of efivarfs at this path is done automatically by systemd if the kernel supports efivarfs. LTS kernels do not support efivarfs. In such cases, the user needs to use
efibootmgrto create a boot entry for gummiboot.
gummibootfails to create a boot entry, check whether all the conditions mentioned here are met.
Installand run the following to install gummiboot:
First, you should enable efivarfs and disable sysfs-efivars interface (for more info refer link):
# umount /sys/firmware/efi/efivars # modprobe -r efivars # modprobe efivarfs # mount -t efivarfs efivarfs /sys/firmware/efi/efivars
# pacman -S gummiboot # gummiboot install
/boot. If your ESP is mounted on
/boot/efiyou have to call the following gummiboot install command with the additional
--pathswitch. This also means that gummiboot will not be able to update itself automatically and you will have to call
gummiboot --path=/boot/efi updateafter 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
/bootif you use gummiboot. The rest of this article will assume that your ESP is mounted on
This will automatically copy the gummiboot binary to your EFI System Partition and create a boot entry in the EFI Boot Manager. 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 during package updates.
The basic configuration is kept in
/boot/loader/loader.conf, with just two possible configuration options:
default– default entry to select (without the
.confsuffix); can be a wildcard like
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 (
/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
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.
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
You can also add other EFI programs such as
\EFI\Microsoft\Boot\Bootmgfw.efi) or an UEFI Shell (
\shellx64.efi) and display entries for them, so you don't have to create these manually.
TODO: document keybindings from http://freedesktop.org/wiki/Software/gummiboot
Manual entry using efibootmgr
gummiboot install command failed you can create a EFI boot entry manually with
# umount /sys/firmware/efi/efivars # modprobe -r efivars
# modprobe efivars
# efibootmgr -c -w -d /dev/sdX -p Y -l '\EFI\gummiboot\gummibootx64.efi' -L "Gummiboot"