Debian Codegraph @

upstream/debian-unstable/man1/bootctl.1

raw
1 '\" t
2 .TH "BOOTCTL" "1" "" "systemd 261~rc3" "bootctl"
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 bootctl \- Control EFI firmware boot settings and manage boot loader
24 .SH "SYNOPSIS"
25 .HP \w'\fBbootctl\fR\ 'u
26 \fBbootctl\fR [OPTIONS...] {COMMAND}
27 .SH "DESCRIPTION"
28 .PP
29 \fBbootctl\fR
30 can check the EFI firmware and boot loader status, list and manage available boot loaders and boot loader entries, and install, update, or remove the
31 \fBsystemd-boot\fR(7)
32 boot loader on the current system\&.
33 .SH "GENERIC EFI FIRMWARE/BOOT LOADER COMMANDS"
34 .PP
35 These commands are available on any EFI system, regardless of the boot loader used\&.
36 .PP
37 \fBstatus\fR
38 .RS 4
39 Shows brief information about the system firmware, the boot loader that was used to boot the system, the boot loaders currently available in the ESP, the boot loaders listed in the firmware\*(Aqs list of boot loaders and the current default boot loader entry\&. If no command is specified, this is the implied default\&.
40 .sp
41 See the example below for details of the output\&.
42 .sp
43 Added in version 239\&.
44 .RE
45 .PP
46 \fBreboot\-to\-firmware\fR [\fIBOOL\fR]
47 .RS 4
48 Query or set the "Reboot\-Into\-Firmware\-Setup" flag of the EFI firmware\&. Takes a boolean argument which controls whether to show the firmware setup on next system reboot\&. If the argument is omitted shows the current status of the flag, or whether the flag is supported\&. This controls the same flag as
49 \fBsystemctl reboot \-\-firmware\-setup\fR, but is more low\-level and allows setting the flag independently from actually requesting a reboot\&.
50 .sp
51 Hint: use
52 \fBsystemctl reboot \-\-firmware\-setup\fR
53 to reboot into firmware setup once\&. See
54 \fBsystemctl\fR(1)
55 for details\&.
56 .sp
57 Added in version 251\&.
58 .RE
59 .SH "BOOT LOADER SPECIFICATION COMMANDS"
60 .PP
61 These commands are available for all boot loaders that implement the
62 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2, such as
63 \fBsystemd\-boot\fR\&.
64 .PP
65 \fBlist\fR
66 .RS 4
67 Shows all available boot loader entries implementing the
68 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2, as well as any other entries discovered or automatically generated by a boot loader implementing the
69 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2\&. JSON output may be requested with
70 \fB\-\-json=\fR\&.
71 .sp
72 See the example below for details of the output\&.
73 .sp
74 Added in version 239\&.
75 .RE
76 .PP
77 \fBunlink\fR [\fIID\fR]
78 .RS 4
79 Removes a boot loader entry including the files it refers to\&. Takes an optional boot loader entry ID string or a glob pattern as argument\&. Referenced files such as the kernel, initrds, system extensions (sysexts), configuration extensions (confexts) or credential files are only removed if no other entry refers to them\&.
80 .sp
81 If no
82 \fIID\fR
83 argument is specified, the
84 \fB\-\-oldest\fR
85 option must be specified, in which case the boot loader entry with the lowest version is removed (for robustness reasons the currently booted menu entry is never removed, nor is the last existing boot loader entry)\&.
86 .sp
87 Added in version 253\&.
88 .RE
89 .PP
90 \fBlink\fR \fIKERNEL\fR
91 .RS 4
92 Creates one or more Type #1 boot loader entries pointing to the specified UKI\&. Takes the path to a Unified Kernel Image (UKI) as argument\&. The UKI is copied into the ESP (or XBOOTLDR partition if present) below the configured entry token directory, and one or more
93 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
94 Type #1 entries are generated referring to it (one per UKI profile, if multiple profiles are embedded)\&.
95 .sp
96 The title, version, commit number and initial try counter of the generated entries may be overridden with
97 \fB\-\-entry\-title=\fR,
98 \fB\-\-entry\-version=\fR,
99 \fB\-\-entry\-commit=\fR
100 and
101 \fB\-\-tries\-left=\fR\&. Additional sidecar resources (system extension images, configuration extension images, credential files) to pass to the UKI at boot may be specified with
102 \fB\-\-extra=\fR\&.
103 .sp
104 If the ESP/XBOOTLDR do not have enough free space for the new boot loader entry and its referenced resources the oldest existing boot loader entry matching the selected entry token is removed (along with any resources referenced by it that are no longer referenced by any other entry)\&. This step is repeated until the new boot loader entry fits\&. For robustness reasons the currently booted boot loader entry is never removed, nor is the last existing boot loader entry\&.
105 .sp
106 By default, the operation refuses to proceed if the resulting ESP/XBOOTLDR free space would drop below a safety threshold after automatic removal of older entries completes; use
107 \fB\-\-keep\-free=\fR
108 to adjust\&.
109 .sp
110 Added in version 261\&.
111 .RE
112 .PP
113 \fBcleanup\fR
114 .RS 4
115 Removes files from the ESP and XBOOTLDR partitions that belong to the entry token but are not referenced in any boot loader entries\&.
116 .sp
117 Added in version 253\&.
118 .RE
119 .SH "BOOT LOADER INTERFACE COMMANDS"
120 .PP
121 These commands are available for all boot loaders that implement the
122 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
123 and the
124 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2, such as
125 \fBsystemd\-boot\fR\&.
126 .PP
127 \fBset\-preferred\fR \fIID\fR, \fBset\-default\fR \fIID\fR, \fBset\-oneshot\fR \fIID\fR, \fBset\-sysfail\fR \fIID\fR
128 .RS 4
129 Sets the default boot loader entry\&. Takes a single boot loader entry ID string or a glob pattern as argument\&. The
130 \fBset\-oneshot\fR
131 command will set the default entry only for the next boot,
132 \fBset\-default\fR
133 will set it persistently for all future boots,
134 \fBset\-preferred\fR
135 is like
136 \fBset\-default\fR, but is aware of boot assessment and will skip boot entries that have their tries\-left counter set to zero\&. The
137 \fBset\-sysfail\fR
138 command will set the boot loader entry to be used in case of a system failure\&. System failure (SysFail) boot entries can optionally modify the automatic selection order in the event of a failure, such as a boot firmware update failure with the failure status recorded in the EFI system table\&.
139 .sp
140 \fBbootctl list\fR
141 can be used to list available boot loader entries and their IDs\&.
142 .sp
143 In addition, the boot loader entry ID may be specified as one of:
144 \fB@default\fR,
145 \fB@oneshot\fR
146 or
147 \fB@current\fR, which correspond to the current default boot loader entry for all future boots, the current default boot loader entry for the next boot, and the currently booted boot loader entry\&. These special IDs are resolved to the current values of the EFI variables
148 \fILoaderEntryDefault\fR,
149 \fILoaderEntrySysFail\fR,
150 \fILoaderEntryOneShot\fR
151 and
152 \fILoaderEntrySelected\fR, see
153 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
154 for details\&. These special IDs are primarily useful as a quick way to persistently make the currently booted boot loader entry the default choice, or to upgrade the default boot loader entry for the next boot to the default boot loader entry for all future boots, but may be used for other operations too\&.
155 .sp
156 If set to
157 \fB@saved\fR
158 the chosen entry will be saved as an EFI variable on every boot and automatically selected the next time the boot loader starts\&.
159 .sp
160 When an empty string ("") is specified as the ID, then the corresponding EFI variable will be unset\&.
161 .sp
162 Hint: use
163 \fBsystemctl reboot \-\-boot\-loader\-entry=\fR\fB\fIID\fR\fR
164 to reboot into a specific boot entry and
165 \fBsystemctl reboot \-\-boot\-loader\-menu=\fR\fB\fItimeout\fR\fR
166 to reboot into the boot loader menu once\&. See
167 \fBsystemctl\fR(1)
168 for details\&.
169 .sp
170 Added in version 240\&.
171 .RE
172 .PP
173 \fBset\-timeout\fR \fITIMEOUT\fR, \fBset\-timeout\-oneshot\fR \fITIMEOUT\fR
174 .RS 4
175 Sets the boot loader menu timeout in seconds\&. The
176 \fBset\-timeout\-oneshot\fR
177 command will set the timeout only for the next boot\&. See
178 \fBsystemd.time\fR(7)
179 for details about the syntax of time spans\&.
180 .sp
181 If this is set to
182 \fBmenu\-disabled\fR
183 or
184 \fBmenu\-hidden\fR
185 or
186 \fB0\fR, no menu is shown and the default entry will be booted immediately, while setting this to
187 \fBmenu\-force\fR
188 disables the timeout while always showing the menu\&. When an empty string ("") is specified the bootloader will revert to its default menu timeout\&.
189 .sp
190 Added in version 250\&.
191 .RE
192 .SH "SYSTEMD\-BOOT COMMANDS"
193 .PP
194 These commands manage the
195 \fBsystemd\-boot\fR
196 EFI boot loader, and do not work in conjunction with other boot loaders\&.
197 .PP
198 \fBinstall\fR
199 .RS 4
200 Installs
201 \fBsystemd\-boot\fR
202 into the EFI system partition\&. A copy of
203 \fBsystemd\-boot\fR
204 will be stored as the EFI default/fallback loader at
205 \fIESP\fR/EFI/BOOT/BOOT*\&.EFI\&. The boot loader is then added to the top of the firmware\*(Aqs boot loader list\&.
206 .sp
207 Added in version 239\&.
208 .RE
209 .PP
210 \fBupdate\fR
211 .RS 4
212 Updates all installed versions of
213 \fBsystemd-boot\fR(7), if the available version is newer than the version installed in the EFI system partition\&. This also includes the EFI default/fallback loader at
214 \fIESP\fR/EFI/BOOT/BOOT*\&.EFI\&. The boot loader is then added to end of the firmware\*(Aqs boot loader list if missing\&.
215 .sp
216 Added in version 239\&.
217 .RE
218 .PP
219 \fBremove\fR
220 .RS 4
221 Removes all installed versions of
222 \fBsystemd\-boot\fR
223 from the EFI system partition and the firmware\*(Aqs boot loader list\&.
224 .sp
225 Added in version 239\&.
226 .RE
227 .PP
228 \fBis\-installed\fR
229 .RS 4
230 Checks whether
231 \fBsystemd\-boot\fR
232 is installed in the ESP\&. Note that a single ESP might host multiple boot loaders; this hence checks whether
233 \fBsystemd\-boot\fR
234 is one (of possibly many) installed boot loaders \(em and neither whether it is the default nor whether it is registered in any EFI variables\&.
235 .sp
236 Added in version 243\&.
237 .RE
238 .PP
239 \fBrandom\-seed\fR
240 .RS 4
241 Generates a random seed and stores it in the EFI System Partition (ESP), for use by the
242 \fBsystemd\-boot\fR
243 boot loader\&. If a random seed already exists in the ESP it is refreshed\&. Also generates a random \*(Aqsystem token\*(Aq and stores it persistently as an EFI variable, if one has not been set before\&. If the boot loader finds the random seed in the ESP and the system token in the EFI variable it will derive a random seed to pass to the OS and a new seed to store in the ESP from the combination of both\&. The random seed passed to the OS is credited to the kernel\*(Aqs entropy pool by the system manager during early boot, and permits userspace to boot up with an entropy pool fully initialized very early on\&. Also see
244 \fBsystemd-boot-random-seed.service\fR(8)\&.
245 .sp
246 See
247 \m[blue]\fBRandom Seeds\fR\m[]\&\s-2\u[3]\d\s+2
248 for further information\&.
249 .sp
250 Added in version 243\&.
251 .RE
252 .SH "KERNEL IMAGE COMMANDS"
253 .PP
254 \fBkernel\-identify\fR \fIKERNEL\-IMAGE\fR
255 .RS 4
256 Takes a kernel image as argument\&. Checks what kind of kernel the image is\&. Returns one of
257 "uki",
258 "addon",
259 "pe", and
260 "unknown"\&.
261 .sp
262 Added in version 253\&.
263 .RE
264 .PP
265 \fBkernel\-inspect\fR \fIKERNEL\-IMAGE\fR
266 .RS 4
267 Takes a kernel image as argument\&. Prints details about the image\&.
268 .sp
269 Added in version 253\&.
270 .RE
271 .SH "OPTIONS"
272 .PP
273 The following options are understood:
274 .PP
275 \fB\-\-esp\-path=\fR
276 .RS 4
277 Path to the EFI System Partition (ESP)\&. If not specified,
278 /efi/,
279 /boot/, and
280 /boot/efi/
281 are checked in turn\&. It is recommended to mount the ESP to
282 /efi/, if possible\&.
283 .RE
284 .PP
285 \fB\-\-boot\-path=\fR
286 .RS 4
287 Path to the Extended Boot Loader partition, as defined in the
288 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2\&. If not specified,
289 /boot/
290 is checked\&. It is recommended to mount the Extended Boot Loader partition to
291 /boot/, if possible\&.
292 .RE
293 .PP
294 \fB\-\-root=\fR\fB\fIroot\fR\fR
295 .RS 4
296 Takes a directory path as an argument\&. All paths will be prefixed with the given alternate
297 \fIroot\fR
298 path, including config search paths\&.
299 .sp
300 Added in version 252\&.
301 .RE
302 .PP
303 \fB\-\-image=\fR\fB\fIimage\fR\fR
304 .RS 4
305 Takes a path to a disk image file or block device node\&. If specified, all operations are applied to file system in the indicated disk image\&. This option is similar to
306 \fB\-\-root=\fR, but operates on file systems stored in disk images or block devices\&. The disk image should either contain just a file system or a set of file systems within a GPT partition table, following the
307 \m[blue]\fBUAPI\&.2 Discoverable Partitions Specification\fR\m[]\&\s-2\u[4]\d\s+2\&. For further information on supported disk images, see
308 \fBsystemd-nspawn\fR(1)\*(Aqs switch of the same name\&.
309 .sp
310 Added in version 252\&.
311 .RE
312 .PP
313 \fB\-\-image\-policy=\fR\fB\fIpolicy\fR\fR
314 .RS 4
315 Takes an image policy string as argument, as per
316 \fBsystemd.image-policy\fR(7)\&. The policy is enforced when operating on the disk image specified via
317 \fB\-\-image=\fR, see above\&. If not specified, defaults to the
318 "*"
319 policy, i\&.e\&. all recognized file systems in the image are used\&.
320 .RE
321 .PP
322 \fB\-\-install\-source=\fR
323 .RS 4
324 When installing binaries with
325 \fB\-\-root=\fR
326 or
327 \fB\-\-image=\fR, selects where to source them from\&. Takes one of
328 "auto"
329 (the default),
330 "image"
331 or
332 "host"\&. With
333 "auto"
334 binaries will be picked from the specified directory or image, and if not found they will be picked from the host\&. With
335 "image"
336 or
337 "host"
338 no fallback search will be performed if the binaries are not found in the selected source\&.
339 .sp
340 Added in version 252\&.
341 .RE
342 .PP
343 \fB\-p\fR, \fB\-\-print\-esp\-path\fR
344 .RS 4
345 This option modifies the behaviour of
346 \fBstatus\fR\&. Only prints the path to the EFI System Partition (ESP) to standard output and exits\&.
347 .sp
348 Added in version 236\&.
349 .RE
350 .PP
351 \fB\-x\fR, \fB\-\-print\-boot\-path\fR
352 .RS 4
353 This option modifies the behaviour of
354 \fBstatus\fR\&. Only prints the path to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to standard output and exit\&. This command is useful to determine where to place boot loader entries, as they are preferably placed in the Extended Boot Loader partition if it exists and in the ESP otherwise\&.
355 .sp
356 Boot Loader Specification Type #1 entries should generally be placed in the directory
357 "$(bootctl \-x)/loader/entries/"\&. Existence of that directory may also be used as indication that boot loader entry support is available on the system\&. Similarly, Boot Loader Specification Type #2 entries should be placed in the directory
358 "$(bootctl \-x)/EFI/Linux/"\&.
359 .sp
360 Note that this option (similarly to the
361 \fB\-\-print\-esp\-path\fR
362 option mentioned above), is available independently from the boot loader used, i\&.e\&. also without
363 \fBsystemd\-boot\fR
364 being installed\&.
365 .sp
366 Added in version 242\&.
367 .RE
368 .PP
369 \fB\-\-print\-loader\-path\fR
370 .RS 4
371 This option modifies the behaviour of
372 \fBstatus\fR: it shows the absolute path to the boot loader EFI binary used for the current boot if this information is available\&. Note that no attempt is made to verify whether the binary still exists\&.
373 .sp
374 Added in version 257\&.
375 .RE
376 .PP
377 \fB\-\-print\-stub\-path\fR
378 .RS 4
379 This option modifies the behaviour of
380 \fBstatus\fR: it shows the absolute path to the UKI/stub EFI binary used for the current boot if this information is available\&. Note that no attempt is made to verify whether the binary still exists\&.
381 .sp
382 Added in version 257\&.
383 .RE
384 .PP
385 \fB\-R\fR, \fB\-\-print\-root\-device\fR
386 .RS 4
387 Print the path to the block device node backing the root file system of the local OS\&. This prints a path such as
388 /dev/nvme0n1p5\&. If the root file system is backed by dm\-crypt/LUKS or dm\-verity the underlying block device is returned\&. If the root file system is backed by multiple block devices (as supported by btrfs) the operation will fail\&. If the switch is specified twice (i\&.e\&.
389 \fB\-RR\fR) and the discovered block device is a partition device the "whole" block device it belongs to is determined and printed (e\&.g\&.
390 /dev/nvme0n1)\&. If the root file system is
391 "tmpfs"
392 (or a similar in\-memory file system), the block device backing
393 /usr/
394 is returned if applicable\&. If the root file system is a network file system (e\&.g\&. NFS, CIFS) the operation will fail\&.
395 .sp
396 Added in version 254\&.
397 .RE
398 .PP
399 \fB\-\-print\-efi\-architecture\fR
400 .RS 4
401 Print the EFI architecture string of the local firmware\&. This is useful to generically format filenames such as
402 boot\fIx64\fR\&.efi
403 that include the local firmware architecture in the name\&.
404 .sp
405 Added in version 261\&.
406 .RE
407 .PP
408 \fB\-\-variables=yes|no|auto\fR
409 .RS 4
410 Controls whether to touch the firmware\*(Aqs boot loader list stored in EFI variables, and other EFI variables\&. If not specified or set to
411 \fBauto\fR, EFI variables will not be modified when execution in a container runtime is detected\&.
412 \fByes\fR
413 may be used to explicit override the check\&.
414 .sp
415 Added in version 258\&.
416 .RE
417 .PP
418 \fB\-\-random\-seed=yes|no\fR
419 .RS 4
420 By default, the
421 \fBinstall\fR
422 command initializes a random seed file in the ESP\&. When creating an image it may be desirable to disable that in order to avoid having the same seed in all instances\&.
423 .sp
424 Added in version 257\&.
425 .RE
426 .PP
427 \fB\-\-graceful\fR
428 .RS 4
429 Ignore failure when the EFI System Partition cannot be found, when EFI variables cannot be written, or a different or newer boot loader is already installed\&. Currently only applies to
430 \fBis\-installed\fR,
431 \fBupdate\fR,
432 \fBrandom\-seed\fR
433 and
434 \fBinstall\fR
435 verbs\&. Since version v258, it is implicitly enabled when running inside a chroot\&.
436 .sp
437 Added in version 244\&.
438 .RE
439 .PP
440 \fB\-q\fR, \fB\-\-quiet\fR
441 .RS 4
442 Suppress printing of the results of various commands and also the hints about ESP being unavailable\&.
443 .sp
444 Added in version 251\&.
445 .RE
446 .PP
447 \fB\-\-make\-entry\-directory=yes|no\fR
448 .RS 4
449 Controls creation and deletion of the
450 \m[blue]\fBUAPI\&.1 Boot Loader Specification\fR\m[]\&\s-2\u[1]\d\s+2
451 Type #1 entry directory on the file system containing resources such as kernel and initrd images during
452 \fBinstall\fR
453 and
454 \fBremove\fR, respectively\&. The directory is named after the entry token, as specified with
455 \fB\-\-entry\-token=\fR
456 parameter described below, and is placed immediately below the
457 \fI$BOOT\fR
458 root directory (i\&.e\&. beneath the file system returned by the
459 \fB\-\-print\-boot\-path\fR
460 option, see above)\&. Defaults to
461 "no"\&.
462 .sp
463 Added in version 251\&.
464 .RE
465 .PP
466 \fB\-\-entry\-token=\fR
467 .RS 4
468 Controls how to name and identify boot loader entries for this OS installation\&. Accepted during
469 \fBinstall\fR, and takes one of
470 "auto",
471 "machine\-id",
472 "os\-id",
473 "os\-image\-id"
474 or an arbitrary string prefixed by
475 "literal:"
476 as argument\&.
477 .sp
478 If set to
479 \fBmachine\-id\fR
480 the entries are named after the machine ID of the running system (e\&.g\&.
481 "b0e793a9baf14b5fa13ecbe84ff637ac")\&. See
482 \fBmachine-id\fR(5)
483 for details about the machine ID concept and file\&.
484 .sp
485 If set to
486 \fBos\-id\fR
487 the entries are named after the OS ID of the running system, i\&.e\&. the
488 \fIID=\fR
489 field of
490 \fBos-release\fR(5)
491 (e\&.g\&.
492 "fedora")\&. Similarly, if set to
493 \fBos\-image\-id\fR
494 the entries are named after the OS image ID of the running system, i\&.e\&. the
495 \fIIMAGE_ID=\fR
496 field of
497 os\-release
498 (e\&.g\&.
499 "vendorx\-cashier\-system")\&.
500 .sp
501 If set to
502 \fBauto\fR
503 (the default), the
504 /etc/kernel/entry\-token
505 file will be read if it exists, and the stored value used\&. Otherwise, if the local machine ID is initialized it is used\&. Otherwise,
506 \fIIMAGE_ID=\fR
507 from
508 os\-release
509 will be used, if set\&. Otherwise,
510 \fIID=\fR
511 from
512 os\-release
513 will be used, if set\&.
514 .sp
515 Unless set to
516 "machine\-id", or when
517 \fB\-\-make\-entry\-directory=yes\fR
518 is used the selected token string is written to a file
519 /etc/kernel/entry\-token, to ensure it will be used for future entries\&. This file is also read by
520 \fBkernel-install\fR(8), in order to identify under which name to generate boot loader entries for newly installed kernels, or to determine the entry names for removing old ones\&.
521 .sp
522 Using the machine ID for naming the entries is generally preferable, however there are cases where using the other identifiers is a good option\&. Specifically: if the identification data that the machine ID entails shall not be stored on the (unencrypted)
523 \fI$BOOT\fR
524 partition, or if the ID shall be generated on first boot and is not known when the entries are prepared\&. Note that using the machine ID has the benefit that multiple parallel installations of the same OS can coexist on the same medium, and they can update their boot loader entries independently\&. When using another identifier (such as the OS ID or the OS image ID), parallel installations of the same OS would try to use the same entry name\&. To support parallel installations, the installer must use a different entry token when adding a second installation\&.
525 .sp
526 Added in version 251\&.
527 .RE
528 .PP
529 \fB\-\-all\-architectures\fR
530 .RS 4
531 Install binaries for all supported EFI architectures (this implies
532 \fB\-\-variables=no\fR)\&.
533 .sp
534 Added in version 252\&.
535 .RE
536 .PP
537 \fB\-\-efi\-boot\-option\-description=\fR
538 .RS 4
539 Description of the entry added to the firmware\*(Aqs boot option list\&. Defaults to
540 "Linux Boot Manager"\&.
541 .sp
542 Using the default entry name
543 "Linux Boot Manager"
544 is generally preferable as only one bootloader installed to a single ESP partition should be used to boot any number of OS installations found on the various disks installed in the system\&. Specifically distributions should not use this flag to install a branded entry in the boot option list\&. However, in situations with multiple disks, each with their own ESP partition, it can be beneficial to make it easier to identify the bootloader being used in the firmware\*(Aqs boot option menu\&.
545 .sp
546 Added in version 252\&.
547 .RE
548 .PP
549 \fB\-\-efi\-boot\-option\-description\-with\-device=\fR
550 .RS 4
551 Takes a boolean, defaults to false\&. Controls whether to append disk model information to the firmware boot option item description (as configured with
552 \fB\-\-efi\-boot\-option\-description=\fR
553 above)\&. This is useful when installing multiple operating systems on separate disks on the same system, as it ensures the firmware boot options are discernible and give a hint which disk is booted into\&. Note that this uses hardware model information, and hence might not be too useful in case multiple disks of an identical model are used\&.
554 .sp
555 Added in version 260\&.
556 .RE
557 .PP
558 \fB\-\-dry\-run\fR
559 .RS 4
560 Dry run for
561 \fBunlink\fR
562 and
563 \fBcleanup\fR\&.
564 .sp
565 In dry run mode, the unlink and cleanup operations only print the files that would get deleted without actually deleting them\&.
566 .sp
567 Added in version 253\&.
568 .RE
569 .PP
570 \fB\-\-oldest\fR
571 .RS 4
572 When used with
573 \fBunlink\fR, selects the oldest installed boot loader entry matching the boot entry token for removal (rather than passing an explicit entry ID)\&. This is useful for pruning older installed boot loader entries\&. Note that the currently booted entry is never removed, nor is the last remaining one\&.
574 .sp
575 Added in version 261\&.
576 .RE
577 .PP
578 \fB\-\-keep\-free=\fR\fB\fIBYTES\fR\fR
579 .RS 4
580 When used with
581 \fBlink\fR, controls the minimum amount of free space (in bytes) that must remain on the target partition (ESP or XBOOTLDR) after the new entry has been materialized\&. The operation fails if installing the entry would drop the free space below this threshold\&. Accepts the usual size suffixes (K, M, G, \&...)\&. If empty, the built\-in default is restored\&. If set to zero no minimum amount of free space is kept\&.
582 .sp
583 Added in version 261\&.
584 .RE
585 .PP
586 \fB\-\-entry\-title=\fR\fB\fITITLE\fR\fR
587 .RS 4
588 When used with
589 \fBlink\fR, specifies the title of the generated boot loader entry (the
590 "title"
591 field of the Type #1 entry)\&. If not specified, a title is derived from the UKI\*(Aqs embedded metadata\&.
592 .sp
593 Added in version 261\&.
594 .RE
595 .PP
596 \fB\-\-entry\-version=\fR\fB\fIVERSION\fR\fR
597 .RS 4
598 When used with
599 \fBlink\fR, specifies the version string of the generated boot loader entry (the
600 "version"
601 field of the Type #1 entry)\&. If not specified, the version is derived from the UKI\*(Aqs embedded metadata\&. Used by the boot loader to sort and select entries\&.
602 .sp
603 Added in version 261\&.
604 .RE
605 .PP
606 \fB\-\-entry\-commit=\fR\fB\fINR\fR\fR
607 .RS 4
608 When used with
609 \fBlink\fR, specifies the commit number for the generated boot loader entry\&.
610 .sp
611 Added in version 261\&.
612 .RE
613 .PP
614 \fB\-\-extra=\fR\fB\fIPATH\fR\fR, \fB\-X \fR\fB\fIPATH\fR\fR
615 .RS 4
616 When used with
617 \fBlink\fR, registers an additional sidecar resource file that shall be passed to the UKI at boot\&. This may be a system extension image (*\&.sysext\&.raw), configuration extension image (*\&.confext\&.raw), or credential file (*\&.cred)\&. The file is copied into the ESP/XBOOTLDR alongside the UKI and the boot loader will load and pass it to the kernel via initrd\&. This option may be used multiple times to register more than one extra resource\&. If passed an empty argument, all previously specified extras are cleared\&.
618 .sp
619 Added in version 261\&.
620 .RE
621 .PP
622 \fB\-\-tries\-left=\fR\fB\fINR\fR\fR
623 .RS 4
624 When used with
625 \fBlink\fR, initializes the boot counting
626 "tries\-left"
627 counter for the generated entry\&. If set, the resulting boot entry file is named according to the boot counting scheme described in the
628 \m[blue]\fBAutomatic Boot Assessment\fR\m[]\&\s-2\u[5]\d\s+2
629 documentation, so that the boot loader decreases the counter on each attempted boot and eventually marks the entry as bad\&. If not specified, boot counting is not enabled for the generated entry\&.
630 .sp
631 Added in version 261\&.
632 .RE
633 .PP
634 \fB\-\-secure\-boot\-auto\-enroll=yes|no\fR, \fB\-\-private\-key=\fR\fB\fIPATH/URI\fR\fR, \fB\-\-private\-key\-source=\fR\fB\fITYPE\fR\fR\fB[:\fR\fB\fINAME\fR\fR\fB]\fR, \fB\-\-certificate=\fR\fB\fIPATH\fR\fR, \fB\-\-certificate\-source=\fR\fB\fITYPE\fR\fR\fB[:\fR\fB\fINAME\fR\fR\fB]\fR
635 .RS 4
636 Configure the ESP for secure boot auto\-enrollment when invoking the
637 \fBinstall\fR
638 command\&. Takes a boolean argument\&. Disabled by default\&. Enabling this option will make
639 \fBbootctl\fR
640 populate the ESP with signed
641 "PK",
642 "KEK"
643 and
644 "db"
645 signature databases, each containing the given certificate in
646 "DER"
647 format as their only entry\&. These secure boot signature databases will be picked up and enrolled by
648 \fBsystemd\-boot\fR
649 if secure boot is in setup mode and secure boot auto\-enrollment is enabled\&.
650 .sp
651 When specifying this option, a certificate and private key have to be provided as well using the
652 \fB\-\-certificate=\fR
653 and
654 \fB\-\-private\-key=\fR
655 options\&. The
656 \fB\-\-certificate=\fR
657 option takes a path to a PEM encoded X\&.509 certificate or a URI that\*(Aqs passed to the OpenSSL provider configured with
658 \fB\-\-certificate\-source\fR
659 which takes one of
660 "file"
661 or
662 "provider", with the latter being followed by a specific provider identifier, separated with a colon, e\&.g\&.
663 "provider:pkcs11"\&. The
664 \fB\-\-private\-key=\fR
665 option can take a path or a URI that will be passed to the OpenSSL engine or provider, as specified by
666 \fB\-\-private\-key\-source=\fR
667 as a
668 "type:name"
669 tuple, such as
670 "engine:pkcs11"\&. The specified OpenSSL signing engine or provider will be used to sign the EFI signature lists\&.
671 .sp
672 Added in version 257\&.
673 .RE
674 .PP
675 \fB\-\-no\-pager\fR
676 .RS 4
677 Do not pipe output into a pager\&.
678 .RE
679 .PP
680 \fB\-\-json=\fR\fB\fIMODE\fR\fR
681 .RS 4
682 Shows output formatted as JSON\&. Expects one of
683 "short"
684 (for the shortest possible output without any redundant whitespace or line breaks),
685 "pretty"
686 (for a pretty version of the same, with indentation and line breaks) or
687 "off"
688 (to turn off JSON output, the default)\&.
689 .RE
690 .PP
691 \fB\-h\fR, \fB\-\-help\fR
692 .RS 4
693 Print a short help text and exit\&.
694 .RE
695 .PP
696 \fB\-\-version\fR
697 .RS 4
698 Print a short version string and exit\&.
699 .RE
700 .SH "SIGNED \&.EFI FILES"
701 .PP
702 \fBbootctl\fR
703 \fBinstall\fR
704 and
705 \fBupdate\fR
706 will look for a
707 \fBsystemd\-boot\fR
708 file ending with the
709 "\&.efi\&.signed"
710 suffix first, and copy that instead of the normal
711 "\&.efi"
712 file\&. This allows distributions or end\-users to provide signed images for UEFI SecureBoot\&.
713 .SH "EXIT STATUS"
714 .PP
715 On success, 0 is returned, a non\-zero failure code otherwise\&.
716 \fBbootctl \-\-print\-root\-device\fR
717 returns exit status 80 in case the root file system is not backed by single block device, and other non\-zero exit statuses on other errors\&.
718 .SH "ENVIRONMENT"
719 .PP
720 If
721 \fI$SYSTEMD_RELAX_ESP_CHECKS=1\fR
722 is set the validation checks for the ESP are relaxed, and the path specified with
723 \fB\-\-esp\-path=\fR
724 may refer to any kind of file system on any kind of partition\&.
725 .PP
726 Similarly,
727 \fI$SYSTEMD_RELAX_XBOOTLDR_CHECKS=1\fR
728 turns off some validation checks for the Extended Boot Loader partition\&.
729 .SH "EXAMPLES"
730 .PP
731 \fBExample\ \&1.\ \&Output from status and list\fR
732 .sp
733 .if n \{\
734 .RS 4
735 .\}
736 .nf
737 $ \fBbootctl status\fR
738 System:
739 Firmware: UEFI 2\&.40 (\fIfirmware\-version\fR) ← firmware vendor and version
740 Secure Boot: disabled (setup) ← Secure Boot status
741 TPM2 Support: yes
742 Boot into FW: supported ← does the firmware support booting into itself
743
744 Current Boot Loader: ← details about systemd\-boot or another boot loader
745 Product: systemd\-boot \fIversion\fR implementing the \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[2]\d\s+2
746 Features: ✓ Boot counting
747 ✓ Menu timeout control
748 ✓ One\-shot menu timeout control
749 ✓ Default entry control
750 ✓ One\-shot entry control
751 ✓ Support for XBOOTLDR partition
752 ✓ Support for passing random seed to OS
753 ✓ Load drop\-in drivers
754 ✓ Boot loader sets ESP information
755 ✓ Menu can be disabled
756 ESP: /dev/disk/by\-partuuid/01234567\-89ab\-cdef\-dead\-beef00000000
757 File: └─/EFI/systemd/systemd\-bootx64\&.efi
758
759 Random Seed: ← random seed used for entropy in early boot
760 Passed to OS: yes
761 System Token: set
762 Exists: yes
763
764 Available Boot Loaders on ESP:
765 ESP: /boot/efi (/dev/disk/by\-partuuid/01234567\-89ab\-cdef\-dead\-beef00000000)
766 File: └─/EFI/systemd/systemd\-bootx64\&.efi (systemd\-boot 251
767 File: └─/EFI/BOOT/BOOTX64\&.EFI (systemd\-boot 251
768
769 Boot Loaders Listed in EFI Variables:
770 Title: Linux Boot Manager
771 ID: 0x0001
772 Status: active, boot\-order
773 Partition: /dev/disk/by\-partuuid/\&...
774 File: └─/EFI/systemd/systemd\-bootx64\&.efi
775
776 Title: Fedora
777 ID: 0x0000
778 Status: active, boot\-order
779 Partition: /dev/disk/by\-partuuid/\&...
780 File: └─/EFI/fedora/shimx64\&.efi
781
782 Title: Linux\-Firmware\-Updater
783 ID: 0x0002
784 Status: active, boot\-order
785 Partition: /dev/disk/by\-partuuid/\&...
786 File: └─/EFI/fedora/fwupdx64\&.efi
787
788 Boot Loader Entries:
789 $BOOT: /boot/efi (/dev/disk/by\-partuuid/01234567\-89ab\-cdef\-dead\-beef00000000)
790
791 Default Boot Loader Entry:
792 type: Boot Loader Specification Type #1 (\&.conf)
793 title: Fedora Linux 36 (Workstation Edition)
794 id: \&...
795 source: /boot/efi/loader/entries/\fIentry\-token\fR\-\fIkernel\-version\fR\&.conf
796 version: \fIkernel\-version\fR
797 machine\-id: \&...
798 linux: /\fIentry\-token\fR/\fIkernel\-version\fR/linux
799 initrd: /\fIentry\-token\fR/\fIkernel\-version\fR/initrd
800 options: root=\&...
801 .fi
802 .if n \{\
803 .RE
804 .\}
805 .sp
806 .if n \{\
807 .RS 4
808 .\}
809 .nf
810 $ \fBbootctl list\fR
811 Boot Loader Entries:
812 type: Boot Loader Specification Type #1 (\&.conf)
813 title: Fedora Linux 36 (Workstation Edition) (default) (selected)
814 id: \&...
815 source: /boot/efi/loader/entries/\fIentry\-token\fR\-\fIkernel\-version\fR\&.conf
816 version: \fIkernel\-version\fR
817 machine\-id: \&...
818 linux: /\fIentry\-token\fR/\fIkernel\-version\fR/linux
819 initrd: /\fIentry\-token\fR/\fIkernel\-version\fR/initrd
820 options: root=\&...
821
822 type: Boot Loader Specification Type #2 (\&.efi)
823 title: Fedora Linux 35 (Workstation Edition)
824 id: \&...
825 source: /boot/efi/EFI/Linux/fedora\-\fIkernel\-version\fR\&.efi
826 version: \fIkernel\-version\fR
827 machine\-id: \&...
828 linux: /EFI/Linux/fedora\-\fIkernel\-version\fR\&.efi
829 options: root=\&...
830
831 type: Automatic
832 title: Reboot Into Firmware Interface
833 id: auto\-reboot\-to\-firmware\-setup
834 source: /sys/firmware/efi/efivars/LoaderEntries\-4a67b082\-0a4c\-41cf\-b6c7\-440b29bb8c4f
835 .fi
836 .if n \{\
837 .RE
838 .\}
839 .PP
840 In the listing,
841 "(default)"
842 specifies the entry that will be used by default, and
843 "(selected)"
844 specifies the entry that was selected the last time (i\&.e\&. is currently running)\&.
845 .SH "SEE ALSO"
846 .PP
847 \fBsystemd-boot\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, \fBsystemd-boot-random-seed.service\fR(8)
848 .SH "NOTES"
849 .IP " 1." 4
850 UAPI.1 Boot Loader Specification
851 .RS 4
852 \%https://uapi-group.org/specifications/specs/boot_loader_specification
853 .RE
854 .IP " 2." 4
855 Boot Loader Interface
856 .RS 4
857 \%https://systemd.io/BOOT_LOADER_INTERFACE
858 .RE
859 .IP " 3." 4
860 Random Seeds
861 .RS 4
862 \%https://systemd.io/RANDOM_SEEDS
863 .RE
864 .IP " 4." 4
865 UAPI.2 Discoverable Partitions Specification
866 .RS 4
867 \%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
868 .RE
869 .IP " 5." 4
870 Automatic Boot Assessment
871 .RS 4
872 \%https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT
873 .RE