1BOOTCTL(1) bootctl BOOTCTL(1)
2
3
4
6 bootctl - Control EFI firmware boot settings and manage boot loader
7
9 bootctl [OPTIONS...] {COMMAND}
10
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
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
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 as argument. The set-oneshot command will set the
57 default entry only for the next boot, the set-default will set it
58 persistently for all future boots. Optionally, the boot loader
59 entry ID may be specified as one of: @default, @oneshot or
60 @current, which correspond to the current default boot loader entry
61 for all future boots, the current default boot loader entry for the
62 next boot, and the currently booted boot loader entry. These
63 special IDs are resolved to the current values of the EFI variables
64 LoaderEntryDefault, LoaderEntryOneShot and LoaderEntrySelected, see
65 Boot Loader Specification[1] for details. These special IDs are
66 primarily useful as a quick way to persistently make the currently
67 booted boot loader entry the default choice, or to upgrade the
68 default boot loader entry for the next boot to the default boot
69 loader entry for all future boots, but may be used for other
70 operations too. When an empty string ("") is specified as an ID,
71 then the corresponding EFI variable will be unset.
72
74 These commands manage the systemd-boot EFI boot loader, and do not work
75 in conjunction with other boot loaders.
76
77 install
78 Installs systemd-boot into the EFI system partition. A copy of
79 systemd-boot will be stored as the EFI default/fallback loader at
80 ESP/EFI/BOOT/BOOT*.EFI. The boot loader is then added to the top of
81 the firmware's boot loader list.
82
83 update
84 Updates all installed versions of systemd-boot(7), if the available
85 version is newer than the version installed in the EFI system
86 partition. This also includes the EFI default/fallback loader at
87 ESP/EFI/BOOT/BOOT*.EFI. The boot loader is then added to end of the
88 firmware's boot loader list if missing.
89
90 remove
91 Removes all installed versions of systemd-boot from the EFI system
92 partition and the firmware's boot loader list.
93
94 is-installed
95 Checks whether systemd-boot is installed in the ESP. Note that a
96 single ESP might host multiple boot loaders; this hence checks
97 whether systemd-boot is one (of possibly many) installed boot
98 loaders — and neither whether it is the default nor whether it is
99 registered in any EFI variables.
100
101 random-seed
102 Generates a random seed and stores it in the EFI System Partition,
103 for use by the systemd-boot boot loader. Also, generates a random
104 'system token' and stores it persistently as an EFI variable, if
105 one has not been set before. If the boot loader finds the random
106 seed in the ESP and the system token in the EFI variable it will
107 derive a random seed to pass to the OS and a new seed to store in
108 the ESP from the combination of both. The random seed passed to the
109 OS is credited to the kernel's entropy pool by the system manager
110 during early boot, and permits userspace to boot up with an entropy
111 pool fully initialized very early on. Also see systemd-boot-system-
112 token.service(8).
113
114 See Random Seeds[3] for further information.
115
117 The following options are understood:
118
119 --esp-path=
120 Path to the EFI System Partition (ESP). If not specified, /efi/,
121 /boot/, and /boot/efi/ are checked in turn. It is recommended to
122 mount the ESP to /efi/, if possible.
123
124 --boot-path=
125 Path to the Extended Boot Loader partition, as defined in the Boot
126 Loader Specification[1]. If not specified, /boot/ is checked. It is
127 recommended to mount the Extended Boot Loader partition to /boot/,
128 if possible.
129
130 -p, --print-esp-path
131 This option modifies the behaviour of status. Only prints the path
132 to the EFI System Partition (ESP) to standard output and exits.
133
134 -x, --print-boot-path
135 This option modifies the behaviour of status. Only prints the path
136 to the Extended Boot Loader partition if it exists, and the path to
137 the ESP otherwise to standard output and exit. This command is
138 useful to determine where to place boot loader entries, as they are
139 preferably placed in the Extended Boot Loader partition if it
140 exists and in the ESP otherwise.
141
142 Boot Loader Specification Type #1 entries should generally be
143 placed in the directory "$(bootctl -x)/loader/entries/". Existence
144 of that directory may also be used as indication that boot loader
145 entry support is available on the system. Similarly, Boot Loader
146 Specification Type #2 entries should be placed in the directory
147 "$(bootctl -x)/EFI/Linux/".
148
149 Note that this option (similar to the --print-booth-path option
150 mentioned above), is available independently from the boot loader
151 used, i.e. also without systemd-boot being installed.
152
153 --no-variables
154 Do not touch the firmware's boot loader list stored in EFI
155 variables.
156
157 --graceful
158 Ignore failure when the EFI System Partition cannot be found, or
159 when EFI variables cannot be written. Currently only applies to
160 random seed operations.
161
162 --make-machine-id-directory=yes|no|auto
163 Control creation and deletion of the top-level machine ID directory
164 on the file system containing boot loader entries (i.e. beneath the
165 file system returned by the --print-boot-path option, see above)
166 during install and remove, respectively. "auto" is equivalent to
167 "yes" if /etc/machine-id resides on a filesystem other than tmpfs
168 and "no" otherwise (in the latter case the machine ID is likely
169 transient and hence should not be used persistently in the ESP).
170 Defaults to "auto". See machine-id(5) for details about the machine
171 ID concept and file.
172
173 Overriding this may be desirable to hide the machine ID from the
174 (unencrypted) ESP, configure a kernel-install(8) script, or,
175 conversely, commit a transient machine ID.
176
177 The top-level machine ID directory is useful to allow smooth
178 multi-boot installations: each installed OS instance will have a
179 different machine ID and thus a separate directory to place its
180 boot-time resources in. If this feature is turned off with this
181 option, care needs to be taken that multiple OS instances do not
182 place conflicting files on the shared ESP and Extended Boot Loader
183 Partitions, or that multiple OS instances are not possible.
184
185 --no-pager
186 Do not pipe output into a pager.
187
188 -h, --help
189 Print a short help text and exit.
190
191 --version
192 Print a short version string and exit.
193
195 On success, 0 is returned, a non-zero failure code otherwise.
196
198 If $SYSTEMD_RELAX_ESP_CHECKS=1 is set the validation checks for the ESP
199 are relaxed, and the path specified with --esp-path= may refer to any
200 kind of file system on any kind of partition.
201
202 Similarly, $SYSTEMD_RELAX_XBOOTLDR_CHECKS=1 turns off some validation
203 checks for the Extended Boot Loader partition.
204
206 systemd-boot(7), Boot Loader Specification[1], Boot Loader
207 Interface[2], systemd-boot-system-token.service(8)
208
210 1. Boot Loader Specification
211 https://systemd.io/BOOT_LOADER_SPECIFICATION
212
213 2. Boot Loader Interface
214 https://systemd.io/BOOT_LOADER_INTERFACE
215
216 3. Random Seeds
217 https://systemd.io/RANDOM_SEEDS
218
219
220
221systemd 249 BOOTCTL(1)