Debian Codegraph @

upstream/mageia-cauldron/man7/systemd-boot.7

raw
1 '\" t
2 .TH "SYSTEMD\-BOOT" "7" "" "systemd 258.7" "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]\fBBoot 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]\fBBoot 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 variables 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 default
260 .sp
261 An EFI variable is set to allow this setting to persist\&.
262 .sp
263 Added in version 239\&.
264 .RE
265 .PP
266 e
267 .RS 4
268 Edit the kernel command line for selected entry
269 .sp
270 Added in version 239\&.
271 .RE
272 .PP
273 +, t
274 .RS 4
275 Increase the timeout before default entry is booted
276 .sp
277 An EFI variable is set to allow this setting to persist\&.
278 .sp
279 Added in version 239\&.
280 .RE
281 .PP
282 \-, T
283 .RS 4
284 Decrease the timeout
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 r
292 .RS 4
293 Change screen resolution, skipping any unsupported modes\&.
294 .sp
295 An EFI variable is set to allow this setting to persist\&.
296 .sp
297 Added in version 250\&.
298 .RE
299 .PP
300 R
301 .RS 4
302 Reset screen resolution to firmware or configuration file default\&.
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 p
310 .RS 4
311 Print status
312 .sp
313 Added in version 250\&.
314 .RE
315 .PP
316 h, ?, F1
317 .RS 4
318 Show a help screen
319 .sp
320 Added in version 239\&.
321 .RE
322 .PP
323 f
324 .RS 4
325 Reboot into firmware interface\&.
326 .sp
327 For compatibility with the keybindings of several firmware implementations this operation may also be reached with
328 F2,
329 F10,
330 Del
331 and
332 Esc\&.
333 .sp
334 Added in version 250\&.
335 .RE
336 .PP
337 Shift+o
338 .RS 4
339 Power off the system\&.
340 .sp
341 Added in version 255\&.
342 .RE
343 .PP
344 Shift+b
345 .RS 4
346 Reboot the system\&.
347 .sp
348 Added in version 255\&.
349 .RE
350 .PP
351 The following keys may be pressed during bootup or in the boot menu to directly boot a specific entry:
352 .PP
353 l
354 .RS 4
355 Linux
356 .sp
357 Added in version 239\&.
358 .RE
359 .PP
360 w
361 .RS 4
362 Windows
363 .sp
364 Added in version 239\&.
365 .RE
366 .PP
367 a
368 .RS 4
369 macOS
370 .sp
371 Added in version 239\&.
372 .RE
373 .PP
374 s
375 .RS 4
376 EFI shell
377 .sp
378 Added in version 239\&.
379 .RE
380 .PP
381 1, 2, 3, 4, 5, 6, 7, 8, 9
382 .RS 4
383 Boot entry number 1 \&... 9
384 .sp
385 Added in version 239\&.
386 .RE
387 .PP
388 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
389 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
390 \fBsystemctl reboot \-\-boot\-loader\-menu=\fR
391 with a non\-zero value from the shell\&.
392 .PP
393 In the editor, most keys simply insert themselves, but the following keys may be used to perform additional actions:
394 .PP
395 ← (Left), → (Right), Home, End
396 .RS 4
397 Navigate left/right
398 .sp
399 Added in version 239\&.
400 .RE
401 .PP
402 Esc, Ctrl+c
403 .RS 4
404 Abort the edit and quit the editor
405 .sp
406 Added in version 239\&.
407 .RE
408 .PP
409 Ctrl+k
410 .RS 4
411 Clear the command line forwards
412 .sp
413 Added in version 239\&.
414 .RE
415 .PP
416 Ctrl+w, Alt+Backspace
417 .RS 4
418 Delete word backwards
419 .sp
420 Added in version 239\&.
421 .RE
422 .PP
423 Ctrl+Del, Alt+d
424 .RS 4
425 Delete word forwards
426 .sp
427 Added in version 239\&.
428 .RE
429 .PP
430 ↵ (Enter)
431 .RS 4
432 Boot entry with the edited command line
433 .sp
434 Added in version 239\&.
435 .RE
436 .PP
437 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 +/\-\&.
438 .SH "FILES"
439 .PP
440 The files
441 \fBsystemd\-boot\fR
442 processes generally reside on the UEFI ESP which is usually mounted to
443 /efi/,
444 /boot/
445 or
446 /boot/efi/
447 during OS runtime\&. It also processes files on the Extended Boot Loader partition which is typically mounted to
448 /boot/, if it exists\&.
449 .PP
450 \fBsystemd\-boot\fR
451 reads runtime configuration such as the boot timeout and default entry from
452 /loader/loader\&.conf
453 on the ESP (in combination with data read from EFI variables)\&. See
454 \fBloader.conf\fR(5)\&.
455 .PP
456 Boot entry description files following the
457 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
458 are read from
459 /loader/entries/
460 on the ESP and the Extended Boot Loader partition\&.
461 .PP
462 Unified kernel boot entries following the
463 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
464 are read from
465 /EFI/Linux/
466 on the ESP and the Extended Boot Loader partition\&.
467 .PP
468 Optionally, a random seed for early boot entropy pool provisioning is stored in
469 /loader/random\-seed
470 in the ESP\&.
471 .PP
472 During initialization,
473 \fBsd\-boot\fR
474 automatically loads all driver files placed in the
475 /EFI/systemd/drivers/
476 directory of the ESP\&. The files placed there must have an extension of the EFI architecture ID followed by
477 \&.efi
478 (e\&.g\&. for x86\-64 this means a suffix of
479 x64\&.efi)\&. This may be used to automatically load file system drivers and similar, to extend the native firmware support\&.
480 .PP
481 Enrollment of Secure Boot variables can be performed manually or automatically if files are available under
482 /loader/keys/\fINAME\fR/{db,dbx,KEK,PK}\&.auth,
483 \fINAME\fR
484 being the display name for the set of variables in the menu\&. If one of the sets is named
485 auto
486 then it might be enrolled automatically depending on the execution environment and the value of the
487 "secure\-boot\-enroll"
488 option\&. See
489 \fBloader.conf\fR(5)\&.
490 .SH "EFI VARIABLES"
491 .PP
492 The following EFI variables are defined, and may be set or read by
493 \fBsystemd\-boot\fR
494 for communication between the boot loader and the OS\&. The vendor UUID
495 "4a67b082\-0a4c\-41cf\-b6c7\-440b29bb8c4f"
496 is used in all cases\&.
497 .PP
498 \fILoaderBootCountPath\fR
499 .RS 4
500 If boot counting is enabled, contains the path to the file in whose name the boot counters are encoded\&. Set by the boot loader\&.
501 \fBsystemd-bless-boot.service\fR(8)
502 uses this information to mark a boot as successful as determined by the successful activation of the
503 boot\-complete\&.target
504 target unit\&.
505 .sp
506 Added in version 240\&.
507 .RE
508 .PP
509 \fILoaderConfigTimeout\fR, \fILoaderConfigTimeoutOneShot\fR
510 .RS 4
511 The menu timeout in seconds\&. Read by the boot loader\&.
512 \fILoaderConfigTimeout\fR
513 is maintained persistently, while
514 \fILoaderConfigTimeoutOneShot\fR
515 is a one\-time override which is read once (in which case it takes precedence over
516 \fILoaderConfigTimeout\fR) and then removed\&.
517 \fILoaderConfigTimeout\fR
518 may be manipulated with the
519 t/T
520 keys, see above\&.
521 .sp
522 Added in version 240\&.
523 .RE
524 .PP
525 \fILoaderConfigConsoleMode\fR
526 .RS 4
527 The numerical menu console mode\&. Read by the boot loader\&.
528 \fILoaderConfigConsoleMode\fR
529 is maintained persistently\&.
530 \fILoaderConfigConsoleMode\fR
531 may be manipulated with the
532 r/R
533 keys, see above\&.
534 .sp
535 Added in version 250\&.
536 .RE
537 .PP
538 \fILoaderDevicePartUUID\fR
539 .RS 4
540 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
541 \fBsystemd-stub\fR(7)
542 will set this too, if not set yet, to support systems that boot directly into a unified kernel image, bypassing any boot loader\&.)
543 \fBsystemd-gpt-auto-generator\fR(8)
544 uses this information to automatically find the disk booted from, in order to discover various other partitions on the same disk automatically\&.
545 .sp
546 Added in version 220\&.
547 .RE
548 .PP
549 \fILoaderDeviceURL\fR
550 .RS 4
551 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\&.
552 .sp
553 Added in version 258\&.
554 .RE
555 .PP
556 \fILoaderEntries\fR
557 .RS 4
558 A list of the identifiers of all discovered boot loader entries\&. Set by the boot loader\&.
559 .sp
560 Added in version 240\&.
561 .RE
562 .PP
563 \fILoaderEntryDefault\fR, \fILoaderEntrySysFail\fR, \fILoaderEntryOneShot\fR
564 .RS 4
565 The identifier of the default boot loader entry\&. Can be set in the OS and the boot loader\&.
566 \fILoaderEntryOneShot\fR
567 sets the default entry for the next boot only, while
568 \fILoaderEntryDefault\fR
569 sets it persistently for all future boots\&.
570 \fBbootctl\fR(1)\*(Aqs
571 \fBset\-default\fR
572 and
573 \fBset\-oneshot\fR
574 commands make use of these variables\&. The boot loader modifies
575 \fILoaderEntryDefault\fR
576 on request, when the
577 d
578 key is used, see above\&.
579 .sp
580 Added in version 240\&.
581 .RE
582 .PP
583 \fILoaderEntryLastBooted\fR
584 .RS 4
585 The identifier of the boot loader entry last attempted\&. Set and read by the boot loader, only when
586 /loader/loader\&.conf
587 has default set to
588 "@saved"\&. See
589 \fBloader.conf\fR(5)\&.
590 .sp
591 The boot loader will ensure
592 \fILoaderEntryLastBooted\fR
593 is up\-to date for every boot, updating it as needed and will omit changing it all together when
594 \fILoaderEntryOneShot\fR
595 is set\&.
596 .sp
597 The boot loader reads the variable, which takes higher priority than
598 \fILoaderEntryDefault\fR\&. The variable is ignored when
599 \fILoaderEntryOneShot\fR
600 is set\&.
601 .sp
602 \fILoaderEntryLastBooted\fR
603 cannot be used as indication that the last boot was successful or not\&.
604 .sp
605 Added in version 250\&.
606 .RE
607 .PP
608 \fILoaderEntrySelected\fR
609 .RS 4
610 The identifier of the boot loader entry currently being booted\&. Set by the boot loader\&.
611 .sp
612 Added in version 240\&.
613 .RE
614 .PP
615 \fILoaderFeatures\fR
616 .RS 4
617 A set of flags indicating the features the boot loader supports\&. Set by the boot loader\&. Use
618 \fBbootctl\fR(1)
619 to view this data\&.
620 .sp
621 Added in version 240\&.
622 .RE
623 .PP
624 \fILoaderFirmwareInfo\fR, \fILoaderFirmwareType\fR
625 .RS 4
626 Brief firmware information\&. Set by the boot loader\&. Use
627 \fBbootctl\fR(1)
628 to view this data\&.
629 .sp
630 Added in version 240\&.
631 .RE
632 .PP
633 \fILoaderTpm2ActivePcrBanks\fR
634 .RS 4
635 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
636 \fB0\fR\&. Set by the boot loader\&. Use
637 \fBsystemd-analyze\fR(1)
638 to view this data\&.
639 .sp
640 Added in version 258\&.
641 .RE
642 .PP
643 \fILoaderImageIdentifier\fR
644 .RS 4
645 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
646 \fILoaderDevicePartUUID\fR, see above)\&. Set by the boot loader\&. (Note that
647 \fBsystemd\-stub\fR
648 will set this too, if not set yet, to support systems that directly boot into a unified kernel image, bypassing any boot loader\&.) Use
649 \fBbootctl\fR(1)
650 to view this data\&.
651 .sp
652 Added in version 220\&.
653 .RE
654 .PP
655 \fILoaderInfo\fR
656 .RS 4
657 Brief information about the boot loader\&. Set by the boot loader\&. Use
658 \fBbootctl\fR(1)
659 to view this data\&.
660 .sp
661 Added in version 240\&.
662 .RE
663 .PP
664 \fILoaderTimeExecUSec\fR, \fILoaderTimeInitUSec\fR, \fILoaderTimeMenuUsec\fR
665 .RS 4
666 Information about the time spent in various parts of the boot loader\&. Set by the boot loader\&. Use
667 \fBsystemd-analyze\fR(1)
668 to view this data\&.
669 .sp
670 Added in version 240\&.
671 .RE
672 .PP
673 \fILoaderSystemToken\fR
674 .RS 4
675 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\&.
676 .sp
677 Added in version 243\&.
678 .RE
679 .PP
680 Many of these variables are defined by the
681 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2\&.
682 .SH "SMBIOS TYPE 11 STRINGS"
683 .PP
684 \fBsystemd\-boot\fR
685 can be configured using SMBIOS Type 11 strings\&. Applicable strings consist of a name, followed by
686 "=", followed by the value\&. Unless
687 \fBsystemd\-boot\fR
688 detects it is running inside a confidential computing environment,
689 \fBsystemd\-boot\fR
690 will search the table for a string with a specific name, and if found, use its value\&. The following strings are read:
691 .PP
692 \fIio\&.systemd\&.boot\&.kernel\-cmdline\-extra\fR
693 .RS 4
694 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\&.
695 .sp
696 Added in version 256\&.
697 .RE
698 .PP
699 \fIio\&.systemd\&.boot\-entries\&.extra:\fR\fIID=DEFINITION\fR
700 .RS 4
701 This allows inserting additional entries into the
702 \fBsystemd\-boot\fR
703 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:
704 .sp
705 .if n \{\
706 .RS 4
707 .\}
708 .nf
709 io\&.systemd\&.boot\-entries\&.extra:fooos\-current\&.conf=title FooOS (Current)
710 uki\-url http://example\&.com/somedir/fooos\&.efi
711 .fi
712 .if n \{\
713 .RE
714 .\}
715 .sp
716 Note that this example contains a newline character\&. When generating this string from a shell care must be taken to encode it correctly\&.
717 .sp
718 Pass multiple strings formatted this way to generate multiple menu entries\&.
719 .sp
720 Added in version 258\&.
721 .RE
722 .SH "BOOT COUNTING"
723 .PP
724 \fBsystemd\-boot\fR
725 implements a simple boot counting mechanism on top of the
726 \m[blue]\fBBoot 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
727 "+"
728 followed by one or two numbers (if two they need to be separated by a
729 "\-"), before the
730 \&.conf
731 or
732 \&.efi
733 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:
734 .sp
735 .RS 4
736 .ie n \{\
737 \h'-04' 1.\h'+01'\c
738 .\}
739 .el \{\
740 .sp -1
741 .IP " 1." 4.2
742 .\}
743 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\&.
744 .RE
745 .sp
746 .RS 4
747 .ie n \{\
748 \h'-04' 2.\h'+01'\c
749 .\}
750 .el \{\
751 .sp -1
752 .IP " 2." 4.2
753 .\}
754 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\&.
755 .RE
756 .sp
757 .RS 4
758 .ie n \{\
759 \h'-04' 3.\h'+01'\c
760 .\}
761 .el \{\
762 .sp -1
763 .IP " 3." 4.2
764 .\}
765 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
766 \fBsystemd-bless-boot.service\fR(8)
767 service moves the currently booted entry from \*(Aqindeterminate\*(Aq into \*(Aqgood\*(Aq state when a boot attempt completed successfully\&.
768 .RE
769 .PP
770 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)\&.
771 .PP
772 Example: let\*(Aqs say a boot loader entry file
773 foo\&.conf
774 is set up for 3 boot tries\&. The installer will hence create it under the name
775 foo+3\&.conf\&. On first boot, the boot loader will rename it to
776 foo+2\-1\&.conf\&. If that boot does not complete successfully, the boot loader will rename it to
777 foo+1\-2\&.conf
778 on the following boot\&. If that fails too, it will finally be renamed
779 foo+0\-3\&.conf
780 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
781 foo\&.conf
782 by the OS, so that it is considered \*(Aqgood\*(Aq from then on\&.
783 .PP
784 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\&.
785 .PP
786 The
787 \fBkernel-install\fR(8)
788 kernel install framework optionally sets the initial \*(Aqtries left\*(Aq counter to the value specified in
789 /etc/kernel/tries
790 when a boot loader entry is first created\&.
791 .SH "USING SYSTEMD\-BOOT IN VIRTUAL MACHINES"
792 .PP
793 When using qemu with OVMF (UEFI Firmware for virtual machines) the
794 \fB\-kernel\fR
795 switch works not only for linux kernels, but for any EFI binary, including sd\-boot and unified linux kernels\&. Example command line for loading
796 \fBsystemd\-boot\fR
797 on x64:
798 .PP
799 \fBqemu\-system\-x86_64 \fR\fB\fI[ \&.\&.\&. ]\fR\fR\fB \-kernel /usr/lib/systemd/boot/efi/systemd\-bootx64\&.efi\fR
800 .PP
801 systemd\-boot 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)\&.
802 .SH "SEE ALSO"
803 .PP
804 \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]\fBBoot 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[4]\d\s+2
805 .SH "NOTES"
806 .IP " 1." 4
807 Boot Loader Specification
808 .RS 4
809 \%https://uapi-group.org/specifications/specs/boot_loader_specification
810 .RE
811 .IP " 2." 4
812 Boot Loader Interface
813 .RS 4
814 \%https://systemd.io/BOOT_LOADER_INTERFACE
815 .RE
816 .IP " 3." 4
817 Automatic Boot Assessment
818 .RS 4
819 \%https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT
820 .RE
821 .IP " 4." 4
822 TPM2 PCR Measurements Made by systemd
823 .RS 4
824 \%https://systemd.io/TPM2_PCR_MEASUREMENTS
825 .RE