Debian Codegraph @

upstream/debian-unstable/man7/systemd-boot.7

raw
1 '\" t
2 .TH "SYSTEMD\-BOOT" "7" "" "systemd 261~rc3" "systemd-boot"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-boot, sd-boot \- A simple UEFI boot manager
24 .SH "DESCRIPTION"
25 .PP
26 \fBsystemd\-boot\fR
27 (short:
28 \fBsd\-boot\fR) is a simple UEFI boot manager\&. It provides a textual menu to select the entry to boot and an editor for the kernel command line\&.
29 \fBsystemd\-boot\fR
30 supports systems with UEFI firmware only\&.
31 .PP
32 \fBsystemd\-boot\fR
33 loads boot entry information from the EFI system partition (ESP), usually mounted at
34 /efi/,
35 /boot/, or
36 /boot/efi/
37 during OS runtime, as well as from the Extended Boot Loader partition (XBOOTLDR) if it exists (usually mounted to
38 /boot/)\&. Configuration file fragments, kernels, initrds and other EFI images to boot generally need to reside on the ESP or the Extended Boot Loader partition\&. Linux kernels must be built with
39 \fBCONFIG_EFI_STUB\fR
40 to be able to be directly executed as an EFI image\&. During boot
41 \fBsystemd\-boot\fR
42 automatically assembles a list of boot entries from the following sources:
43 .sp
44 .RS 4
45 .ie n \{\
46 \h'-04'\(bu\h'+03'\c
47 .\}
48 .el \{\
49 .sp -1
50 .IP \(bu 2.3
51 .\}
52 Boot entries defined with
53 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
54 Type #1 description files located in
55 /loader/entries/
56 on the ESP and the Extended Boot Loader Partition\&. These usually describe Linux kernel images with associated initrd images, but alternatively may also describe other arbitrary EFI executables\&.
57 .RE
58 .sp
59 .RS 4
60 .ie n \{\
61 \h'-04'\(bu\h'+03'\c
62 .\}
63 .el \{\
64 .sp -1
65 .IP \(bu 2.3
66 .\}
67 Unified kernel images,
68 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
69 Type #2, which are executable EFI binaries in
70 /EFI/Linux/
71 on the ESP and the Extended Boot Loader Partition\&.
72 .RE
73 .sp
74 .RS 4
75 .ie n \{\
76 \h'-04'\(bu\h'+03'\c
77 .\}
78 .el \{\
79 .sp -1
80 .IP \(bu 2.3
81 .\}
82 The Microsoft Windows EFI boot manager, if installed\&.
83 .RE
84 .sp
85 .RS 4
86 .ie n \{\
87 \h'-04'\(bu\h'+03'\c
88 .\}
89 .el \{\
90 .sp -1
91 .IP \(bu 2.3
92 .\}
93 The Apple macOS boot manager, if installed\&.
94 .RE
95 .sp
96 .RS 4
97 .ie n \{\
98 \h'-04'\(bu\h'+03'\c
99 .\}
100 .el \{\
101 .sp -1
102 .IP \(bu 2.3
103 .\}
104 The EFI Shell binary, if installed\&.
105 .RE
106 .sp
107 .RS 4
108 .ie n \{\
109 \h'-04'\(bu\h'+03'\c
110 .\}
111 .el \{\
112 .sp -1
113 .IP \(bu 2.3
114 .\}
115 A
116 "Reboot Into Firmware Interface"
117 option, if supported by the UEFI firmware\&.
118 .RE
119 .sp
120 .RS 4
121 .ie n \{\
122 \h'-04'\(bu\h'+03'\c
123 .\}
124 .el \{\
125 .sp -1
126 .IP \(bu 2.3
127 .\}
128 Secure Boot variable enrollment if the UEFI firmware is in setup mode and files are provided on the ESP\&.
129 .RE
130 .PP
131 \fBsystemd\-boot\fR
132 supports the following features:
133 .sp
134 .RS 4
135 .ie n \{\
136 \h'-04'\(bu\h'+03'\c
137 .\}
138 .el \{\
139 .sp -1
140 .IP \(bu 2.3
141 .\}
142 Basic boot manager configuration changes (such as timeout configuration, default boot entry selection, \&...) may be made directly from the boot loader UI at boot\-time, as well as during system runtime with EFI variables\&.
143 .RE
144 .sp
145 .RS 4
146 .ie n \{\
147 \h'-04'\(bu\h'+03'\c
148 .\}
149 .el \{\
150 .sp -1
151 .IP \(bu 2.3
152 .\}
153 The boot manager integrates with the
154 \fBsystemctl\fR
155 command to implement features such as
156 \fBsystemctl reboot \-\-boot\-loader\-entry=\&...\fR
157 (for rebooting into a specific boot menu entry, i\&.e\&. "reboot into Windows") and
158 \fBsystemctl reboot \-\-boot\-loader\-menu=\&...\fR
159 (for rebooting into the boot loader menu), by implementing the
160 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2\&. See
161 \fBsystemctl\fR(1)
162 for details\&.
163 .RE
164 .sp
165 .RS 4
166 .ie n \{\
167 \h'-04'\(bu\h'+03'\c
168 .\}
169 .el \{\
170 .sp -1
171 .IP \(bu 2.3
172 .\}
173 An EFI variable set by the boot loader informs the OS about the EFI System Partition used during boot\&. This is then used to automatically mount the correct EFI System Partition to
174 /efi/
175 or
176 /boot/
177 during OS runtime\&. See
178 \fBsystemd-gpt-auto-generator\fR(8)
179 for details\&.
180 .RE
181 .sp
182 .RS 4
183 .ie n \{\
184 \h'-04'\(bu\h'+03'\c
185 .\}
186 .el \{\
187 .sp -1
188 .IP \(bu 2.3
189 .\}
190 The boot manager provides information about the boot time spent in UEFI firmware using the
191 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2\&. This information can be displayed using
192 \fBsystemd-analyze\fR(1)\&.
193 .RE
194 .sp
195 .RS 4
196 .ie n \{\
197 \h'-04'\(bu\h'+03'\c
198 .\}
199 .el \{\
200 .sp -1
201 .IP \(bu 2.3
202 .\}
203 The boot manager implements boot counting and automatic fallback to older, working boot entries on failure\&. See
204 \m[blue]\fBAutomatic Boot Assessment\fR\m[]\&\s-2\u[3]\d\s+2\&.
205 .RE
206 .sp
207 .RS 4
208 .ie n \{\
209 \h'-04'\(bu\h'+03'\c
210 .\}
211 .el \{\
212 .sp -1
213 .IP \(bu 2.3
214 .\}
215 The boot manager optionally reads a random seed from the ESP partition, combines it with a \*(Aqsystem token\*(Aq stored in a persistent EFI variable and derives a random seed to use by the OS as entropy pool initialization, providing a full entropy pool during early boot\&.
216 .RE
217 .sp
218 .RS 4
219 .ie n \{\
220 \h'-04'\(bu\h'+03'\c
221 .\}
222 .el \{\
223 .sp -1
224 .IP \(bu 2.3
225 .\}
226 The boot manager allows for Secure Boot variables to be enrolled if the UEFI firmware is in setup mode\&. Additionally, variables can be automatically enrolled if configured\&.
227 .RE
228 .PP
229 \fBbootctl\fR(1)
230 may be used from a running system to locate the ESP and the Extended Boot Loader Partition, list available entries, and install
231 \fBsystemd\-boot\fR
232 itself\&.
233 .PP
234 \fBkernel-install\fR(8)
235 may be used to copy kernel images onto the ESP or the Extended Boot Loader Partition and to generate description files compliant with the Boot Loader Specification\&.
236 .PP
237 \fBsystemd-stub\fR(7)
238 may be used as UEFI boot stub for executed kernels, which is useful to show graphical boot splashes before transitioning into the Linux world\&. It is also capable of automatically picking up auxiliary credential files (for boot parameterization) and system extension images, as companion files to the booted kernel images\&.
239 .SH "KEY BINDINGS"
240 .PP
241 The following keys may be used in the boot menu:
242 .PP
243 ↑ (Up), ↓ (Down), j, k, PageUp, PageDown, Home, End
244 .RS 4
245 Navigate up/down in the entry list
246 .sp
247 Added in version 239\&.
248 .RE
249 .PP
250 ↵ (Enter), → (Right)
251 .RS 4
252 Boot selected entry
253 .sp
254 Added in version 239\&.
255 .RE
256 .PP
257 d
258 .RS 4
259 Make selected entry the preferred boot entry
260 .sp
261 An EFI variable is set to allow this setting to persist\&.
262 .sp
263 Added in version 260\&.
264 .RE
265 .PP
266 D
267 .RS 4
268 Make selected entry the default boot entry
269 .sp
270 An EFI variable is set to allow this setting to persist\&.
271 .sp
272 Added in version 260\&.
273 .RE
274 .PP
275 e
276 .RS 4
277 Edit the kernel command line for selected entry
278 .sp
279 Added in version 239\&.
280 .RE
281 .PP
282 +, t
283 .RS 4
284 Increase the timeout before default entry is booted
285 .sp
286 An EFI variable is set to allow this setting to persist\&.
287 .sp
288 Added in version 239\&.
289 .RE
290 .PP
291 \-, T
292 .RS 4
293 Decrease the timeout
294 .sp
295 An EFI variable is set to allow this setting to persist\&.
296 .sp
297 Added in version 239\&.
298 .RE
299 .PP
300 r
301 .RS 4
302 Change screen resolution, skipping any unsupported modes\&.
303 .sp
304 An EFI variable is set to allow this setting to persist\&.
305 .sp
306 Added in version 250\&.
307 .RE
308 .PP
309 R
310 .RS 4
311 Reset screen resolution to firmware or configuration file default\&.
312 .sp
313 An EFI variable is set to allow this setting to persist\&.
314 .sp
315 Added in version 250\&.
316 .RE
317 .PP
318 p
319 .RS 4
320 Print status
321 .sp
322 Added in version 250\&.
323 .RE
324 .PP
325 h, ?, F1
326 .RS 4
327 Show a help screen
328 .sp
329 Added in version 239\&.
330 .RE
331 .PP
332 f
333 .RS 4
334 Reboot into firmware interface\&.
335 .sp
336 For compatibility with the keybindings of several firmware implementations this operation may also be reached with
337 F2,
338 F10,
339 Del
340 and
341 Esc\&.
342 .sp
343 Added in version 250\&.
344 .RE
345 .PP
346 Shift+o
347 .RS 4
348 Power off the system\&.
349 .sp
350 Added in version 255\&.
351 .RE
352 .PP
353 Shift+b
354 .RS 4
355 Reboot the system\&.
356 .sp
357 Added in version 255\&.
358 .RE
359 .PP
360 The following keys may be pressed during bootup or in the boot menu to directly boot a specific entry:
361 .PP
362 l
363 .RS 4
364 Linux
365 .sp
366 Added in version 239\&.
367 .RE
368 .PP
369 w
370 .RS 4
371 Windows
372 .sp
373 Added in version 239\&.
374 .RE
375 .PP
376 a
377 .RS 4
378 macOS
379 .sp
380 Added in version 239\&.
381 .RE
382 .PP
383 s
384 .RS 4
385 EFI shell
386 .sp
387 Added in version 239\&.
388 .RE
389 .PP
390 1, 2, 3, 4, 5, 6, 7, 8, 9
391 .RS 4
392 Boot entry number 1 \&... 9
393 .sp
394 Added in version 239\&.
395 .RE
396 .PP
397 The boot menu is shown when a non\-zero menu timeout has been configured\&. If the menu timeout has been set to zero, hold down a key (space
398 is recommended) before the boot loader initializes to bring up the boot menu\&. Note that depending on the firmware implementation the time window where key presses are accepted before the boot loader initializes might be short\&. If the window is missed, reboot and try again, possibly repeatedly pressing a suitable key; on most systems it should be possible to hit the time window after a few attempts\&. Keys other than the space bar may be used, except for the keys listed above\&. If showing the menu on demand doesn\*(Aqt work well, consider setting a non\-zero timeout to show the boot menu unconditionally\&. Some desktop environments might offer an option to boot directly into the boot menu, which also avoids the problem altogether\&. Alternatively, use the command line
399 \fBsystemctl reboot \-\-boot\-loader\-menu=\fR
400 with a non\-zero value from the shell\&.
401 .PP
402 In the editor, most keys simply insert themselves, but the following keys may be used to perform additional actions:
403 .PP
404 ← (Left), → (Right), Home, End
405 .RS 4
406 Navigate left/right
407 .sp
408 Added in version 239\&.
409 .RE
410 .PP
411 Esc, Ctrl+c
412 .RS 4
413 Abort the edit and quit the editor
414 .sp
415 Added in version 239\&.
416 .RE
417 .PP
418 Ctrl+k
419 .RS 4
420 Clear the command line forwards
421 .sp
422 Added in version 239\&.
423 .RE
424 .PP
425 Ctrl+w, Alt+Backspace
426 .RS 4
427 Delete word backwards
428 .sp
429 Added in version 239\&.
430 .RE
431 .PP
432 Ctrl+Del, Alt+d
433 .RS 4
434 Delete word forwards
435 .sp
436 Added in version 239\&.
437 .RE
438 .PP
439 ↵ (Enter)
440 .RS 4
441 Boot entry with the edited command line
442 .sp
443 Added in version 239\&.
444 .RE
445 .PP
446 Note that unless configured otherwise in the UEFI firmware, systemd\-boot will use the US keyboard layout, so key labels might not match for keys like +/\-\&.
447 .SH "FILES"
448 .PP
449 The files
450 \fBsystemd\-boot\fR
451 processes generally reside on the UEFI ESP which is usually mounted to
452 /efi/,
453 /boot/
454 or
455 /boot/efi/
456 during OS runtime\&. It also processes files on the Extended Boot Loader partition which is typically mounted to
457 /boot/, if it exists\&.
458 .PP
459 \fBsystemd\-boot\fR
460 reads runtime configuration such as the boot timeout and default entry from
461 /loader/loader\&.conf
462 on the ESP (in combination with data read from EFI variables)\&. See
463 \fBloader.conf\fR(5)\&.
464 .PP
465 Boot entry description files following the
466 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
467 are read from
468 /loader/entries/
469 on the ESP and the Extended Boot Loader partition\&.
470 .PP
471 Unified kernel boot entries following the
472 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
473 are read from
474 /EFI/Linux/
475 on the ESP and the Extended Boot Loader partition\&.
476 .PP
477 Optionally, a random seed for early boot entropy pool provisioning is stored in
478 /loader/random\-seed
479 in the ESP\&.
480 .PP
481 During initialization,
482 \fBsystemd\-boot\fR
483 automatically loads all driver files placed in the
484 /EFI/systemd/drivers/
485 directory of the ESP\&. The files placed there must have an extension of the EFI architecture ID followed by
486 \&.efi
487 (e\&.g\&. for x86\-64 this means a suffix of
488 x64\&.efi)\&. This may be used e\&.g\&. to add support for hardware not supported natively by the firmware\&.
489 .PP
490 Enrollment of Secure Boot variables can be performed manually or automatically if files are available under
491 /loader/keys/\fINAME\fR/{db,dbx,KEK,PK}\&.auth,
492 \fINAME\fR
493 being the display name for the set of variables in the menu\&. If one of the sets is named
494 auto
495 then it might be enrolled automatically depending on the execution environment and the value of the
496 "secure\-boot\-enroll"
497 option\&. See
498 \fBloader.conf\fR(5)\&.
499 .SH "COMPANION FILES"
500 .PP
501 For Type #1 boot loader entries (as defined in the
502 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2)
503 \fBsystemd\-boot\fR
504 will collect additional companion resources declared via the
505 "extra"
506 key in the entry, dynamically generate
507 \fBcpio\fR
508 initrd archives from them, and register those archives via the Linux initrd EFI protocol so that they are passed to the kernel together with the entry\*(Aqs own initrd\&. This is supported for entries referencing a Unified Kernel Image (UKI) via the
509 "uki"
510 or
511 "uki\-url"
512 keys\&. Each
513 "extra"
514 key references a single regular file (relative to the root of the file system containing the entry snippet) and the key may be specified multiple times\&. Companion resources are recognized by file name suffix:
515 .sp
516 .RS 4
517 .ie n \{\
518 \h'-04'\(bu\h'+03'\c
519 .\}
520 .el \{\
521 .sp -1
522 .IP \(bu 2.3
523 .\}
524 Files with the
525 \&.cred
526 suffix are packed into a
527 \fBcpio\fR
528 archive placed in the
529 /\&.extra/credentials/
530 directory of the initrd file hierarchy\&. This is intended to convey auxiliary, encrypted, authenticated credentials for use with
531 \fILoadCredentialEncrypted=\fR\&. See
532 \fBsystemd.exec\fR(5)
533 and
534 \fBsystemd-creds\fR(1)
535 for details on encrypted credentials\&. The generated
536 \fBcpio\fR
537 archive is measured into TPM PCR 12 (if a TPM is present)\&.
538 .RE
539 .sp
540 .RS 4
541 .ie n \{\
542 \h'-04'\(bu\h'+03'\c
543 .\}
544 .el \{\
545 .sp -1
546 .IP \(bu 2.3
547 .\}
548 Files with the
549 \&.sysext\&.raw
550 suffix are packed into a
551 \fBcpio\fR
552 archive placed in the
553 /\&.extra/sysext/
554 directory of the initrd file hierarchy\&. This is intended to pass additional entry\-specific system extension images to the initrd\&. See
555 \fBsystemd-sysext\fR(8)
556 for details on system extension images\&. The generated
557 \fBcpio\fR
558 archive is measured into TPM PCR 13 (if a TPM is present)\&.
559 .RE
560 .sp
561 .RS 4
562 .ie n \{\
563 \h'-04'\(bu\h'+03'\c
564 .\}
565 .el \{\
566 .sp -1
567 .IP \(bu 2.3
568 .\}
569 Files with the
570 \&.confext\&.raw
571 suffix are packed into a
572 \fBcpio\fR
573 archive placed in the
574 /\&.extra/confext/
575 directory of the initrd file hierarchy\&. This is intended to pass additional entry\-specific configuration extension images to the initrd\&. See
576 \fBsystemd-confext\fR(8)
577 for details on configuration extension images\&. The generated
578 \fBcpio\fR
579 archive is measured into TPM PCR 12 (if a TPM is present)\&.
580 .RE
581 .PP
582 When the booted kernel is a UKI, the
583 \fBsystemd\-stub\fR
584 UEFI stub embedded in it will combine the companion resources injected here with any companion files it itself collects from the UKI\*(Aqs
585 \&.extra\&.d/
586 drop\-in directory and from
587 /loader/credentials/
588 and
589 /loader/extensions/, so that all sources are merged uniformly into
590 /\&.extra/
591 in the initrd\&. See
592 \fBsystemd-stub\fR(7)
593 for details\&.
594 .PP
595 Example Type #1 entry making use of the
596 "extra"
597 key:
598 .sp
599 .if n \{\
600 .RS 4
601 .\}
602 .nf
603 title My OS
604 version 1\&.2\&.3
605 machine\-id 6a9857a393724b7a981ebb5b8495b9ea
606 uki /6a9857a393724b7a981ebb5b8495b9ea/1\&.2\&.3/img\&.efi
607 extra /6a9857a393724b7a981ebb5b8495b9ea/1\&.2\&.3/foo\&.cred
608 extra /6a9857a393724b7a981ebb5b8495b9ea/1\&.2\&.3/bar\&.sysext\&.raw
609 extra /6a9857a393724b7a981ebb5b8495b9ea/1\&.2\&.3/baz\&.confext\&.raw
610 .fi
611 .if n \{\
612 .RE
613 .\}
614 .SH "EFI VARIABLES"
615 .PP
616 The following EFI variables are defined, and may be set or read by
617 \fBsystemd\-boot\fR
618 for communication between the boot loader and the OS\&. The vendor UUID
619 "4a67b082\-0a4c\-41cf\-b6c7\-440b29bb8c4f"
620 is used in all cases\&.
621 .PP
622 \fILoaderBootCountPath\fR
623 .RS 4
624 If boot counting is enabled, contains the path to the file in whose name the boot counters are encoded\&. Set by the boot loader\&.
625 \fBsystemd-bless-boot.service\fR(8)
626 uses this information to mark a boot as successful as determined by the successful activation of the
627 boot\-complete\&.target
628 target unit\&.
629 .sp
630 Added in version 240\&.
631 .RE
632 .PP
633 \fILoaderConfigTimeout\fR, \fILoaderConfigTimeoutOneShot\fR
634 .RS 4
635 The menu timeout in seconds\&. Read by the boot loader\&.
636 \fILoaderConfigTimeout\fR
637 is maintained persistently, while
638 \fILoaderConfigTimeoutOneShot\fR
639 is a one\-time override which is read once (in which case it takes precedence over
640 \fILoaderConfigTimeout\fR) and then removed\&.
641 \fILoaderConfigTimeout\fR
642 may be manipulated with the
643 t/T
644 keys, see above\&.
645 .sp
646 Added in version 240\&.
647 .RE
648 .PP
649 \fILoaderConfigConsoleMode\fR
650 .RS 4
651 The numerical menu console mode\&. Read by the boot loader\&.
652 \fILoaderConfigConsoleMode\fR
653 is maintained persistently\&.
654 \fILoaderConfigConsoleMode\fR
655 may be manipulated with the
656 r/R
657 keys, see above\&.
658 .sp
659 Added in version 250\&.
660 .RE
661 .PP
662 \fILoaderDevicePartUUID\fR
663 .RS 4
664 Contains the partition UUID of the partition the boot loader has been started from on the current boot (usually an EFI System Partition)\&. Set by the boot loader\&. (Note that
665 \fBsystemd-stub\fR(7)
666 will set this too, if not set yet, to support systems that boot directly into a unified kernel image, bypassing any boot loader\&.)
667 \fBsystemd-gpt-auto-generator\fR(8)
668 uses this information to automatically find the disk booted from, in order to discover various other partitions on the same disk automatically\&.
669 .sp
670 Added in version 220\&.
671 .RE
672 .PP
673 \fILoaderDeviceURL\fR
674 .RS 4
675 If the boot loader has been invoked via network booting this variable contains the originating URL\&. This may be used to automatically acquire additional resources from the same source\&.
676 .sp
677 Added in version 258\&.
678 .RE
679 .PP
680 \fILoaderEntries\fR
681 .RS 4
682 A list of the identifiers of all discovered boot loader entries\&. Set by the boot loader\&.
683 .sp
684 Added in version 240\&.
685 .RE
686 .PP
687 \fILoaderEntryPreferred\fR, \fILoaderEntryDefault\fR, \fILoaderEntrySysFail\fR, \fILoaderEntryOneShot\fR
688 .RS 4
689 The identifier of the default boot loader entry\&. Can be set in the OS and the boot loader\&.
690 \fILoaderEntryOneShot\fR
691 sets the default entry for the next boot only, while
692 \fILoaderEntryDefault\fR
693 sets it persistently for all future boots\&.
694 \fILoaderEntryPreferred\fR
695 is like
696 \fILoaderEntryDefault\fR
697 but additionally takes into account boot assessment and skips boot entries with a tries\-left counter equal to zero\&.
698 \fBbootctl\fR(1)\*(Aqs
699 \fBset\-default\fR
700 and
701 \fBset\-oneshot\fR
702 commands make use of these variables\&. The boot loader modifies
703 \fILoaderEntryDefault\fR
704 on request, when the
705 d
706 key is used, see above\&.
707 .sp
708 Added in version 240\&.
709 .RE
710 .PP
711 \fILoaderEntryLastBooted\fR
712 .RS 4
713 The identifier of the boot loader entry last attempted\&. Set and read by the boot loader, only when
714 /loader/loader\&.conf
715 has default set to
716 "@saved"\&. See
717 \fBloader.conf\fR(5)\&.
718 .sp
719 The boot loader will ensure
720 \fILoaderEntryLastBooted\fR
721 is up\-to date for every boot, updating it as needed and will omit changing it all together when
722 \fILoaderEntryOneShot\fR
723 is set\&.
724 .sp
725 The boot loader reads the variable, which takes higher priority than
726 \fILoaderEntryDefault\fR\&. The variable is ignored when
727 \fILoaderEntryOneShot\fR
728 is set\&.
729 .sp
730 \fILoaderEntryLastBooted\fR
731 cannot be used as indication that the last boot was successful or not\&.
732 .sp
733 Added in version 250\&.
734 .RE
735 .PP
736 \fILoaderEntrySelected\fR
737 .RS 4
738 The identifier of the boot loader entry currently being booted\&. Set by the boot loader\&.
739 .sp
740 Added in version 240\&.
741 .RE
742 .PP
743 \fILoaderFeatures\fR
744 .RS 4
745 A set of flags indicating the features the boot loader supports\&. Set by the boot loader\&. Use
746 \fBbootctl\fR(1)
747 to view this data\&.
748 .sp
749 Added in version 240\&.
750 .RE
751 .PP
752 \fILoaderFirmwareInfo\fR, \fILoaderFirmwareType\fR
753 .RS 4
754 Brief firmware information\&. Set by the boot loader\&. Use
755 \fBbootctl\fR(1)
756 to view this data\&.
757 .sp
758 Added in version 240\&.
759 .RE
760 .PP
761 \fILoaderTpm2ActivePcrBanks\fR
762 .RS 4
763 Hexadecimal string representation of a bitmask with values defined by the TCG EFI Protocol Specification for TPM 2\&.0 as EFI_TCG2_BOOT_HASH_ALG_*\&. If no TPM2 support or no active banks were detected, will be set to
764 \fB0\fR\&. Set by the boot loader\&. Use
765 \fBsystemd-analyze\fR(1)
766 to view this data\&.
767 .sp
768 Added in version 258\&.
769 .RE
770 .PP
771 \fILoaderPcrSMBIOS\fR
772 .RS 4
773 The PCR register index select SMBIOS structures are measured into \(em type 1 (system information, with the volatile "Wake\-up Type" field zeroed out), type 2 (baseboard information) and type 11 (OEM strings)\&. Formatted as decimal ASCII string (e\&.g\&.
774 "1")\&. Set by the boot loader if a measurement was successfully completed, and remains unset otherwise\&. (Note that
775 \fBsystemd\-stub\fR
776 performs the same measurement when booted directly, bypassing the boot loader\&.)
777 .sp
778 Added in version 261\&.
779 .RE
780 .PP
781 \fILoaderImageIdentifier\fR
782 .RS 4
783 The file system path to the EFI executable of the boot loader for the current boot, relative to the partition\*(Aqs root directory (i\&.e\&. relative to the partition indicated by
784 \fILoaderDevicePartUUID\fR, see above)\&. Set by the boot loader\&. (Note that
785 \fBsystemd\-stub\fR
786 will set this too, if not set yet, to support systems that directly boot into a unified kernel image, bypassing any boot loader\&.) Use
787 \fBbootctl\fR(1)
788 to view this data\&.
789 .sp
790 Added in version 220\&.
791 .RE
792 .PP
793 \fILoaderInfo\fR
794 .RS 4
795 Brief information about the boot loader\&. Set by the boot loader\&. Use
796 \fBbootctl\fR(1)
797 to view this data\&.
798 .sp
799 Added in version 240\&.
800 .RE
801 .PP
802 \fILoaderTimeExecUSec\fR, \fILoaderTimeInitUSec\fR, \fILoaderTimeMenuUsec\fR
803 .RS 4
804 Information about the time spent in various parts of the boot loader\&. Set by the boot loader\&. Use
805 \fBsystemd-analyze\fR(1)
806 to view this data\&.
807 .sp
808 Added in version 240\&.
809 .RE
810 .PP
811 \fILoaderSystemToken\fR
812 .RS 4
813 A binary random data field, that is used for generating the random seed to pass to the OS (see above)\&. Note that this random data is generally only generated once, during OS installation, and is then never updated again\&.
814 .sp
815 Added in version 243\&.
816 .RE
817 .PP
818 Many of these variables are defined by the
819 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2\&.
820 .SH "SMBIOS TYPE 11 STRINGS"
821 .PP
822 \fBsystemd\-boot\fR
823 can be configured using SMBIOS Type 11 strings\&. Applicable strings consist of a name, followed by
824 "=", followed by the value\&. Unless
825 \fBsystemd\-boot\fR
826 detects it is running inside a confidential computing environment,
827 \fBsystemd\-boot\fR
828 will search the table for a string with a specific name, and if found, use its value\&. The following strings are read:
829 .PP
830 \fIio\&.systemd\&.boot\&.kernel\-cmdline\-extra\fR
831 .RS 4
832 If set, the value of this string is added to the list of kernel command line arguments for Boot Loader Specification Type 1 entries that are measured in PCR12 and passed to the kernel\&.
833 .sp
834 Added in version 256\&.
835 .RE
836 .PP
837 \fIio\&.systemd\&.boot\-entries\&.extra:\fR\fIID=DEFINITION\fR
838 .RS 4
839 This allows inserting additional entries into the
840 \fBsystemd\-boot\fR
841 menu\&. Take a pair of menu entry identifier and menu entry definition string\&. The former should be suitable for use as a filename of a Boot Loader Specification Type #1 entry filename (note that it is used for identification purposes only, no file of this name is actually accessed), the latter shall follow the syntax of the contents of a Type #1 entry\&. Any menu entry defined this way is processed and shown in pretty much the same way as a Type #1 entry read from the ESP or XBOOTLDR partition\&. Example:
842 .sp
843 .if n \{\
844 .RS 4
845 .\}
846 .nf
847 io\&.systemd\&.boot\-entries\&.extra:fooos\-current\&.conf=title FooOS (Current)
848 uki\-url http://example\&.com/somedir/fooos\&.efi
849 .fi
850 .if n \{\
851 .RE
852 .\}
853 .sp
854 Note that this example contains a newline character\&. When generating this string from a shell care must be taken to encode it correctly\&.
855 .sp
856 Pass multiple strings formatted this way to generate multiple menu entries\&.
857 .sp
858 Added in version 258\&.
859 .RE
860 .PP
861 \fIio\&.systemd\&.boot\&.loglevel\fR
862 .RS 4
863 If set, the value of this string is used as log level\&. Valid values (from most to least critical) are
864 "emerg",
865 "alert",
866 "crit",
867 "err",
868 "warning",
869 "notice",
870 "info", and
871 "debug"\&.
872 .sp
873 Added in version 259\&.
874 .RE
875 .SH "BOOT COUNTING"
876 .PP
877 \fBsystemd\-boot\fR
878 implements a simple boot counting mechanism on top of the
879 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2, for automatic and unattended fallback to older kernel versions/boot loader entries when a specific entry continuously fails\&. Any boot loader entry file and unified kernel image file that contains a
880 "+"
881 followed by one or two numbers (if two they need to be separated by a
882 "\-"), before the
883 \&.conf
884 or
885 \&.efi
886 suffix is subject to boot counting: the first of the two numbers (\*(Aqtries left\*(Aq) is decreased by one on every boot attempt, the second of the two numbers (\*(Aqtries done\*(Aq) is increased by one (if \*(Aqtries done\*(Aq is absent it is considered equivalent to 0)\&. Depending on the current value of these two counters the boot entry is considered to be in one of three states:
887 .sp
888 .RS 4
889 .ie n \{\
890 \h'-04' 1.\h'+01'\c
891 .\}
892 .el \{\
893 .sp -1
894 .IP " 1." 4.2
895 .\}
896 If the \*(Aqtries left\*(Aq counter of an entry is greater than zero the entry is considered to be in \*(Aqindeterminate\*(Aq state\&. This means the entry has not completed booting successfully yet, but also has not been determined not to work\&.
897 .RE
898 .sp
899 .RS 4
900 .ie n \{\
901 \h'-04' 2.\h'+01'\c
902 .\}
903 .el \{\
904 .sp -1
905 .IP " 2." 4.2
906 .\}
907 If the \*(Aqtries left\*(Aq counter of an entry is zero it is considered to be in \*(Aqbad\*(Aq state\&. This means no further attempts to boot this item will be made (that is, unless all other boot entries are also in \*(Aqbad\*(Aq state), as all attempts to boot this entry have not completed successfully\&.
908 .RE
909 .sp
910 .RS 4
911 .ie n \{\
912 \h'-04' 3.\h'+01'\c
913 .\}
914 .el \{\
915 .sp -1
916 .IP " 3." 4.2
917 .\}
918 If the \*(Aqtries left\*(Aq and \*(Aqtries done\*(Aq counters of an entry are absent it is considered to be in \*(Aqgood\*(Aq state\&. This means further boot counting for the entry is turned off, as it successfully booted at least once\&. The
919 \fBsystemd-bless-boot.service\fR(8)
920 service moves the currently booted entry from \*(Aqindeterminate\*(Aq into \*(Aqgood\*(Aq state when a boot attempt completed successfully\&.
921 .RE
922 .PP
923 Generally, when new entries are added to the boot loader, they first start out in \*(Aqindeterminate\*(Aq state, i\&.e\&. with a \*(Aqtries left\*(Aq counter greater than zero\&. The boot entry remains in this state until either it managed to complete a full boot successfully at least once (in which case it will be in \*(Aqgood\*(Aq state) \(em or the \*(Aqtries left\*(Aq counter reaches zero (in which case it will be in \*(Aqbad\*(Aq state)\&.
924 .PP
925 Example: let\*(Aqs say a boot loader entry file
926 foo\&.conf
927 is set up for 3 boot tries\&. The installer will hence create it under the name
928 foo+3\&.conf\&. On first boot, the boot loader will rename it to
929 foo+2\-1\&.conf\&. If that boot does not complete successfully, the boot loader will rename it to
930 foo+1\-2\&.conf
931 on the following boot\&. If that fails too, it will finally be renamed
932 foo+0\-3\&.conf
933 by the boot loader on next boot, after which it will be considered \*(Aqbad\*(Aq\&. If the boot succeeds however the entry file will be renamed to
934 foo\&.conf
935 by the OS, so that it is considered \*(Aqgood\*(Aq from then on\&.
936 .PP
937 The boot menu takes the \*(Aqtries left\*(Aq counter into account when sorting the menu entries: entries in \*(Aqbad\*(Aq state are ordered at the beginning of the list, and entries in \*(Aqgood\*(Aq or \*(Aqindeterminate\*(Aq at the end\&. The user can freely choose to boot any entry of the menu, including those already marked \*(Aqbad\*(Aq\&. If the menu entry to boot is automatically determined, this means that \*(Aqgood\*(Aq or \*(Aqindeterminate\*(Aq entries are generally preferred (as the bottom item of the menu is the one booted by default), and \*(Aqbad\*(Aq entries will only be considered if there are no \*(Aqgood\*(Aq or \*(Aqindeterminate\*(Aq entries left\&.
938 .PP
939 The
940 \fBkernel-install\fR(8)
941 kernel install framework optionally sets the initial \*(Aqtries left\*(Aq counter to the value specified in
942 /etc/kernel/tries
943 when a boot loader entry is first created\&.
944 .SH "USING SYSTEMD\-BOOT IN VIRTUAL MACHINES"
945 .PP
946 When using
947 \m[blue]\fBqemu\fR\m[]\&\s-2\u[4]\d\s+2
948 with
949 \m[blue]\fBOVMF\fR\m[]\&\s-2\u[5]\d\s+2
950 (UEFI Firmware for virtual machines) the
951 \fB\-kernel\fR
952 switch works not only for linux kernels, but for any EFI binary, including
953 systemd\-boot
954 and unified linux kernels (UKIs)\&. Example command line for loading
955 \fBsystemd\-boot\fR
956 on x64:
957 .PP
958 \fBqemu\-system\-x86_64 \-drive if=pflash,format=qcow2,readonly=on,file=/usr/share/edk2/ovmf/OVMF_CODE_4M\&.qcow2 \-kernel /usr/lib/systemd/boot/efi/systemd\-bootx64\&.efi \-drive file=\fR\fB\fI\&.\&.\&.\fR\fR\fB \fR\fB\fI[ \&.\&.\&. ]\fR\fR\fB \fR
959 .PP
960 (The path to the firmware file might need to be adjusted depending on the distribution\&.)
961 systemd\-boot
962 will detect that it was started directly instead of being loaded from ESP and will search for the ESP in that case, taking into account boot order information from the hypervisor (if available)\&. Note that for this to yield a useful result, another
963 \fB\-drive\fR
964 argument needs to be used to attach an actual disk image with an ESP\&.
965 .SH "SEE ALSO"
966 .PP
967 \fBbootctl\fR(1), \fBloader.conf\fR(5), \fBsystemd-bless-boot.service\fR(8), \fBsystemd-boot-random-seed.service\fR(8), \fBkernel-install\fR(8), \fBsystemd-stub\fR(7), \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2, \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2, \m[blue]\fBTPM2 PCR Measurements Made by systemd\fR\m[]\&\s-2\u[6]\d\s+2
968 .SH "NOTES"
969 .IP " 1." 4
970 UAPI.1 Boot Loader Specification
971 .RS 4
972 \%https://uapi-group.org/specifications/specs/boot_loader_specification
973 .RE
974 .IP " 2." 4
975 Boot Loader Interface
976 .RS 4
977 \%https://systemd.io/BOOT_LOADER_INTERFACE
978 .RE
979 .IP " 3." 4
980 Automatic Boot Assessment
981 .RS 4
982 \%https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT
983 .RE
984 .IP " 4." 4
985 qemu
986 .RS 4
987 \%https://www.qemu.org/docs/master/
988 .RE
989 .IP " 5." 4
990 OVMF
991 .RS 4
992 \%https://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt
993 .RE
994 .IP " 6." 4
995 TPM2 PCR Measurements Made by systemd
996 .RS 4
997 \%https://systemd.io/TPM2_PCR_MEASUREMENTS
998 .RE