1BOOTCTL(1)                          bootctl                         BOOTCTL(1)
2
3
4

NAME

6       bootctl - Control EFI firmware boot settings and manage boot loader
7

SYNOPSIS

9       bootctl [OPTIONS...] {COMMAND}
10

DESCRIPTION

12       bootctl can check the EFI firmware and boot loader status, list and
13       manage available boot loaders and boot loader entries, and install,
14       update, or remove the systemd-boot(7) boot loader on the current
15       system.
16

GENERIC EFI FIRMWARE/BOOT LOADER COMMANDS

18       These commands are available on any EFI system, regardless of the boot
19       loader used.
20
21       status
22           Shows brief information about the system firmware, the boot loader
23           that was used to boot the system, the boot loaders currently
24           available in the ESP, the boot loaders listed in the firmware's
25           list of boot loaders and the current default boot loader entry. If
26           no command is specified, this is the implied default.
27
28       reboot-to-firmware [BOOL]
29           Query or set the "Reboot-Into-Firmware-Setup" flag of the EFI
30           firmware. Takes a boolean argument which controls whether to show
31           the firmware setup on next system reboot. If the argument is
32           omitted shows the current status of the flag, or whether the flag
33           is supported. This controls the same flag as systemctl reboot
34           --firmware-setup, but is more low-level and allows setting the flag
35           independently from actually requesting a reboot.
36
37       systemd-efi-options [STRING]
38           When called without the optional argument, prints the current value
39           of the "SystemdOptions" EFI variable. When called with an argument,
40           sets the variable to that value. See systemd(1) for the meaning of
41           that variable.
42

BOOT LOADER SPECIFICATION COMMANDS

44       These commands are available for all boot loaders that implement the
45       Boot Loader Specification[1] and/or the Boot Loader Interface[2], such
46       as systemd-boot.
47
48       list
49           Shows all available boot loader entries implementing the Boot
50           Loader Specification[1], as well as any other entries discovered or
51           automatically generated by a boot loader implementing the Boot
52           Loader Interface[2].
53
54       set-default ID, set-oneshot ID
55           Sets the default boot loader entry. Takes a single boot loader
56           entry ID string or a glob pattern as argument. The set-oneshot
57           command will set the default entry only for the next boot, the
58           set-default will set it persistently for all future boots.
59           Optionally, the boot loader entry ID may be specified as one of:
60           @default, @oneshot or @current, which correspond to the current
61           default boot loader entry for all future boots, the current default
62           boot loader entry for the next boot, and the currently booted boot
63           loader entry. These special IDs are resolved to the current values
64           of the EFI variables LoaderEntryDefault, LoaderEntryOneShot and
65           LoaderEntrySelected, see Boot Loader Specification[1] for details.
66           These special IDs are primarily useful as a quick way to
67           persistently make the currently booted boot loader entry the
68           default choice, or to upgrade the default boot loader entry for the
69           next boot to the default boot loader entry for all future boots,
70           but may be used for other operations too.
71
72           If set to @saved the chosen entry will be saved as an EFI variable
73           on every boot and automatically selected the next time the boot
74           loader starts.
75
76           When an empty string ("") is specified as an ID, then the
77           corresponding EFI variable will be unset.
78
79       set-timeout TIMEOUT, set-timeout-oneshot TIMEOUT
80           Sets the boot loader menu timeout in seconds. The
81           set-timeout-oneshot command will set the timeout only for the next
82           boot. See systemd.time(7) for details about the syntax of time
83           spans.
84
85           If this is set to menu-hidden or 0 no menu is shown and the default
86           entry will be booted immediately, while setting this to menu-force
87           disables the timeout while always showing the menu. When an empty
88           string ("") is specified the bootloader will revert to its default
89           menu timeout.
90

SYSTEMD-BOOT COMMANDS

92       These commands manage the systemd-boot EFI boot loader, and do not work
93       in conjunction with other boot loaders.
94
95       install
96           Installs systemd-boot into the EFI system partition. A copy of
97           systemd-boot will be stored as the EFI default/fallback loader at
98           ESP/EFI/BOOT/BOOT*.EFI. The boot loader is then added to the top of
99           the firmware's boot loader list.
100
101       update
102           Updates all installed versions of systemd-boot(7), if the available
103           version is newer than the version installed in the EFI system
104           partition. This also includes the EFI default/fallback loader at
105           ESP/EFI/BOOT/BOOT*.EFI. The boot loader is then added to end of the
106           firmware's boot loader list if missing.
107
108       remove
109           Removes all installed versions of systemd-boot from the EFI system
110           partition and the firmware's boot loader list.
111
112       is-installed
113           Checks whether systemd-boot is installed in the ESP. Note that a
114           single ESP might host multiple boot loaders; this hence checks
115           whether systemd-boot is one (of possibly many) installed boot
116           loaders — and neither whether it is the default nor whether it is
117           registered in any EFI variables.
118
119       random-seed
120           Generates a random seed and stores it in the EFI System Partition,
121           for use by the systemd-boot boot loader. Also, generates a random
122           'system token' and stores it persistently as an EFI variable, if
123           one has not been set before. If the boot loader finds the random
124           seed in the ESP and the system token in the EFI variable it will
125           derive a random seed to pass to the OS and a new seed to store in
126           the ESP from the combination of both. The random seed passed to the
127           OS is credited to the kernel's entropy pool by the system manager
128           during early boot, and permits userspace to boot up with an entropy
129           pool fully initialized very early on. Also see systemd-boot-system-
130           token.service(8).
131
132           See Random Seeds[3] for further information.
133

OPTIONS

135       The following options are understood:
136
137       --esp-path=
138           Path to the EFI System Partition (ESP). If not specified, /efi/,
139           /boot/, and /boot/efi/ are checked in turn. It is recommended to
140           mount the ESP to /efi/, if possible.
141
142       --boot-path=
143           Path to the Extended Boot Loader partition, as defined in the Boot
144           Loader Specification[1]. If not specified, /boot/ is checked. It is
145           recommended to mount the Extended Boot Loader partition to /boot/,
146           if possible.
147
148       -p, --print-esp-path
149           This option modifies the behaviour of status. Only prints the path
150           to the EFI System Partition (ESP) to standard output and exits.
151
152       -x, --print-boot-path
153           This option modifies the behaviour of status. Only prints the path
154           to the Extended Boot Loader partition if it exists, and the path to
155           the ESP otherwise to standard output and exit. This command is
156           useful to determine where to place boot loader entries, as they are
157           preferably placed in the Extended Boot Loader partition if it
158           exists and in the ESP otherwise.
159
160           Boot Loader Specification Type #1 entries should generally be
161           placed in the directory "$(bootctl -x)/loader/entries/". Existence
162           of that directory may also be used as indication that boot loader
163           entry support is available on the system. Similarly, Boot Loader
164           Specification Type #2 entries should be placed in the directory
165           "$(bootctl -x)/EFI/Linux/".
166
167           Note that this option (similar to the --print-booth-path option
168           mentioned above), is available independently from the boot loader
169           used, i.e. also without systemd-boot being installed.
170
171       --no-variables
172           Do not touch the firmware's boot loader list stored in EFI
173           variables.
174
175       --graceful
176           Ignore failure when the EFI System Partition cannot be found, when
177           EFI variables cannot be written, or a different or newer boot
178           loader is already installed. Currently only applies to random seed
179           and update operations.
180
181       --make-machine-id-directory=yes|no
182           Control creation and deletion of the top-level machine ID directory
183           on the file system containing boot loader entries (i.e. beneath the
184           file system returned by the --print-boot-path option, see above)
185           during install and remove, respectively. Defaults to "no". See
186           machine-id(5) for details about the machine ID concept and file.
187
188           Overriding this may be desirable to hide the machine ID from the
189           (unencrypted) ESP, configure a kernel-install(8) script, or,
190           conversely, commit a transient machine ID.
191
192           The top-level machine ID directory is useful to allow smooth
193           multi-boot installations: each installed OS instance will have a
194           different machine ID and thus a separate directory to place its
195           boot-time resources in. If this feature is turned off with this
196           option, care needs to be taken that multiple OS instances do not
197           place conflicting files on the shared ESP and Extended Boot Loader
198           Partitions, or that multiple OS instances are not possible.
199
200       --no-pager
201           Do not pipe output into a pager.
202
203       -h, --help
204           Print a short help text and exit.
205
206       --version
207           Print a short version string and exit.
208

SIGNED .EFI FILES

210       bootctl install and update will look for a systemd-boot file ending
211       with the ".efi.signed" suffix first, and copy that instead of the
212       normal ".efi" file. This allows distributions or end-users to provide
213       signed images for UEFI SecureBoot.
214

EXIT STATUS

216       On success, 0 is returned, a non-zero failure code otherwise.
217

ENVIRONMENT

219       If $SYSTEMD_RELAX_ESP_CHECKS=1 is set the validation checks for the ESP
220       are relaxed, and the path specified with --esp-path= may refer to any
221       kind of file system on any kind of partition.
222
223       Similarly, $SYSTEMD_RELAX_XBOOTLDR_CHECKS=1 turns off some validation
224       checks for the Extended Boot Loader partition.
225

SEE ALSO

227       systemd-boot(7), Boot Loader Specification[1], Boot Loader
228       Interface[2], systemd-boot-system-token.service(8)
229

NOTES

231        1. Boot Loader Specification
232           https://systemd.io/BOOT_LOADER_SPECIFICATION
233
234        2. Boot Loader Interface
235           https://systemd.io/BOOT_LOADER_INTERFACE
236
237        3. Random Seeds
238           https://systemd.io/RANDOM_SEEDS
239
240
241
242systemd 250                                                         BOOTCTL(1)
Impressum