]> git.ipfire.org Git - thirdparty/systemd.git/blame - docs/BOOT.md
libpasswdqc: add missing `#include "dlfcn-util.h"`
[thirdparty/systemd.git] / docs / BOOT.md
CommitLineData
163e2c83
MG
1---
2title: systemd-boot UEFI Boot Manager
3category: Documentation for Developers
4layout: default
5SPDX-License-Identifier: LGPL-2.1-or-later
6---
7
8# systemd-boot UEFI Boot Manager
9
10systemd-boot is a UEFI boot manager which executes configured EFI images. The default entry is selected by a configured pattern (glob) or an on-screen menu.
11
e9a55bab 12systemd-boot operates on the EFI System Partition (ESP) only. Configuration file fragments, kernels, initrds, other EFI images need to reside on the ESP.
13
14Linux kernels need to be built with CONFIG\_EFI\_STUB to be able to be directly executed as an EFI image.
163e2c83
MG
15
16systemd-boot reads simple and entirely generic boot loader configuration files; one file per boot loader entry to select from. All files need to reside on the ESP.
17
e9a55bab 18Pressing the Space key (or most other keys actually work too) during bootup will show an on-screen menu with all configured loader entries to select from.
19
20Pressing Enter on the selected entry loads and starts the EFI image.
163e2c83
MG
21
22If no timeout is configured, which is the default setting, and no key pressed during bootup, the default entry is executed right away.
23
24![systemd-boot menu](/assets/systemd-boot-menu.png)
25
26All configuration files are expected to be 7-bit ASCII or valid UTF8. The loader configuration file understands the following keywords:
27
28| Config |
29|---------|------------------------------------------------------------|
30| default | pattern to select the default entry in the list of entries |
31| timeout | timeout in seconds for how long to show the menu |
32
33
34The entry configuration files understand the following keywords:
35
36| Entry |
37|--------|------------------------------------------------------------|
38| title | text to show in the menu |
39| version | version string to append to the title when the title is not unique |
40| machine-id | machine identifier to append to the title when the title is not unique |
41| efi | executable EFI image |
42| options | options to pass to the EFI image / kernel command line |
43| linux | linux kernel image (systemd-boot still requires the kernel to have an EFI stub) |
44| initrd | initramfs image (systemd-boot just adds this as option initrd=) |
45
46
47Examples:
48```
49/boot/loader/loader.conf
50timeout 3
51default 6a9857a393724b7a981ebb5b8495b9ea-*
52
53/boot/loader/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
54title Fedora 19 (Rawhide)
55version 3.8.0-2.fc19.x86_64
56machine-id 6a9857a393724b7a981ebb5b8495b9ea
57linux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
58initrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd
59options root=UUID=f8f83f73-df71-445c-87f7-31f70263b83b quiet
60
61/boot/loader/entries/custom-kernel.conf
62title My kernel
63efi /bzImage
64options root=PARTUUID=084917b7-8be2-4e86-838d-f771a9902e08
65
66/boot/loader/entries/custom-kernel-initrd.conf
67title My kernel with initrd
68linux /bzImage
69initrd /initrd.img
70options root=PARTUUID=084917b7-8be2-4e86-838d-f771a9902e08 quiet`
71```
72
73
74While the menu is shown, the following keys are active:
75
76| Keys |
77|--------|------------------------------------------------------------|
78| Up/Down | Select menu entry |
79| Enter | boot the selected entry |
80| d | select the default entry to boot (stored in a non-volatile EFI variable) |
81| t/T | adjust the timeout (stored in a non-volatile EFI variable) |
82| e | edit the option line (kernel command line) for this bootup to pass to the EFI image |
83| Q | quit |
84| v | show the systemd-boot and UEFI version |
85| P | print the current configuration to the console |
86| h | show key mapping |
87
88Hotkeys to select a specific entry in the menu, or when pressed during bootup to boot the entry right-away:
89
90
91
92| Keys |
93|--------|------------------------------------------------------------|
94| l | Linux |
95| w | Windows |
96| a | OS X |
97| s | EFI Shell |
98| 1-9 | number of entry |
99
100Some EFI variables control the loader or exported the loaders state to the started operating system. The vendor UUID `4a67b082-0a4c-41cf-b6c7-440b29bb8c4f` and the variable names are supposed to be shared across all loaders implementations which follow this scheme of configuration:
101
102| EFI Variables |
103|---------------|------------------------|-------------------------------|
104| LoaderEntryDefault | entry identifier to select as default at bootup | non-volatile |
105| LoaderConfigTimeout | timeout in seconds to show the menu | non-volatile |
106| LoaderEntryOneShot | entry identifier to select at the next and only the next bootup | non-volatile |
107| LoaderDeviceIdentifier | list of identifiers of the volume the loader was started from | volatile |
108| LoaderDevicePartUUID | partition GPT UUID of the ESP systemd-boot was executed from | volatile |
109
110
111Links:
112
113[https://github.com/systemd/systemd](https://github.com/systemd/systemd)
114
5f1b83d2 115[https://uapi-group.org/specifications/specs/boot_loader_specification/](https://uapi-group.org/specifications/specs/boot_loader_specification/)