https://wiki.archlinux.org/api.php?action=feedcontributions&user=Tweezerhead&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:12:11ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Systemd-boot&diff=228197Systemd-boot2012-10-11T18:15:05Z<p>Tweezerhead: in arch.conf linux /vmlinuz-linux needs .efi extension otherwise gummi cant find kernel</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[http://freedesktop.org/wiki/Software/gummiboot Gummiboot] is a UEFI boot manager 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.<br />
<br />
{{Note|<br />
In the following steps replace {{ic|$esp}} with path to your [[UEFI#Create_an_UEFI_System_Partition_in_Linux|EFI System Partition]], which is normally mounted on {{ic|/boot/efi}} (although some users have it on {{ic|/boot}} directly).<br />
}}<br />
<br />
== Installing ==<br />
<br />
Install {{Pkg|gummiboot-efi}} from [extra] and copy the bootloader to the EFI partition:<br />
<br />
If you are on a 64-bit UEFI system:<br />
# cp /usr/lib/gummiboot/gummibootx64.efi $esp/EFI/gummiboot/gummiboot.efi<br />
<br />
If you are on a 32-bit UEFI system:<br />
# cp /usr/lib/gummiboot/gummibootia32.efi $esp/EFI/gummiboot/gummiboot.efi<br />
<br />
Then add it to the boot configuration: (only needs to be done once; skip this when upgrading)<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Gummiboot" -l '\EFI\gummiboot\gummiboot.efi'<br />
<br />
where /dev/sdX is the drive and Y is the partition number of your UEFISYS partition.<br />
<br />
{{note|{{ic|efibootmgr}} can be used only when already booted in UEFI mode. If you do not have another UEFI bootloader set up, you can either run {{ic|gummiboot.efi}} from the UEFI Shell, or copy it to the "default" location {{ic|$esp/EFI/boot/bootx64.efi}} for x86_64 systems.}}<br />
<br />
== Configuring ==<br />
<br />
The basic configuration is kept in {{ic|$esp/loader/loader.conf}}, with just two possible configuration options:<br />
<br />
* {{ic|default}} – default entry to select (without the {{ic|.conf}} suffix); can be a wildcard like {{ic|arch-*}}<br />
<br />
* {{ic|timeout}} – menu timeout in seconds. If this is not set, the menu will only be shows when you hold the space key while booting.<br />
<br />
Example:<br />
<br />
{{hc|$esp/loader/loader.conf|<br />
default arch<br />
timeout 4<br />
}}<br />
<br />
Note that both options can be changed in the boot menu itself, which will store them as EFI variables.<br />
<br />
== Adding boot entries ==<br />
<br />
{{note|<br />
If you have separate partitions for {{ic|/boot}} and {{ic|/boot/efi}}, you '''must''' copy the kernel and initramfs to the EFI partition. Gummiboot does not support loading kernels from other partitions than itself. See the section below on how to automate this.<br />
}}<br />
<br />
Gummiboot searches for boot menu items in {{ic|$esp/loader/entries/*.conf}} – each file found must contain exactly one boot entry. The possible options are:<br />
<br />
* {{ic|title}} – operating system name. '''Required.'''<br />
<br />
* {{ic|title-version}} – kernel version, shown only when multiple entries with same title exist. Optional.<br />
<br />
* {{ic|title-machine}} – machine identifier (usually first few letters from {{ic|/etc/machine-id}}, shown only when multiple entries with same title+version exist. Optional.<br />
<br />
* {{ic|efi}} – EFI program to start; e.g. {{ic|\EFI\arch\vmlinuz-linux.efi}}. '''Required.'''<br />
<br />
* {{ic|options}} – Command-line options to pass to the EFI program. Optional, but you will need at least {{ic|1=initrd=''efipath''}} and {{ic|1=root=''dev''}} if booting Linux.<br />
<br />
An example entry for Arch Linux:<br />
<br />
{{hc|$esp/loader/entries/arch.conf|2=<br />
title Arch Linux<br />
linux /vmlinuz-linux.efi<br />
initrd /initramfs-linux.img<br />
options root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 ro<br />
}}<br />
<br />
For Linux, you can specify {{ic|linux ''path-to-vmlinuz''}} and {{ic|initrd ''path-to-initramfs''}}; this will be automatically translated to {{ic|efi ''path''}} and {{ic|1=options initrd=''path''}} – this syntax is only supported for convenience and has no differences in function.<br />
<br />
You can also add other EFI programs such as {{ic|\EFI\arch\grub.efi}} or {{ic|\EFI\Microsoft\Boot\Bootmgfw.efi}} (the Windows 7 boot manager). The EFI Shell, if installed, will be shown automatically.<br />
<br />
{{hc|$esp/loader/entries/shell.conf|2=<br />
title UEFI Shell<br />
efi /shellx64.efi<br />
}}<br />
<br />
== Separate boot and EFI partitions ==<br />
<br />
TODO: link my kernel-post-upgrade stuff, https://github.com/grawity/code/tree/master/os/arch<br />
<br />
== Inside the boot menu ==<br />
<br />
TODO: document keybindings from http://freedesktop.org/wiki/Software/gummiboot</div>Tweezerhead