2 .\" Copyright (c) 2017-2018 Netflix, Inc.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd manipulate the EFI Boot Manager
75 program manipulates how UEFI Boot Managers boot the system.
76 It can create and destroy methods for booting along with activating or
78 It can also change the defined order of boot methods.
79 It can create a temporary boot (BootNext) variable that references a
80 boot method to be tried once upon the next boot.
82 The UEFI standard defines how hosts may control what is used to
84 Each method is encapsulated within a persistent UEFI variable, stored
85 by the UEFI BIOS of the form
87 (where XXXX are uppercase hexadecimal digits).
88 These variables are numbered, each describing where to load the bootstrap
89 program from, and whether or not the method is active (used for booting,
90 otherwise the method will be skipped).
91 The order of these methods is controlled by another variable,
93 The currently booted method is communicated using
95 A global timeout can also be set.
98 requires that the kernel module
100 module be present or loaded to get and set these
101 non-volatile variables.
103 The following options are available:
108 boot entry, or the new entry when used with
114 .It Fl b -bootnum Ar bootnum
115 When creating or modifying an entry, use
118 When creating a new entry, fail if it already exists.
126 variable (aka method or entry).
128 Process but do not change any variables.
132 path to the ESP device, derived from the EFI variables
136 This is the ESP partition used by UEFI to boot the current
137 instance of the system.
140 is specified, the UEFI device path to the ESP is reported instead.
143 is specified, the mount point of the ESP is reported instead.
144 .It Fl f -fw-ui , Fl F -no-fw-ui
145 Set or clear the request to the system firmware to stop in its user
146 interface on the next boot.
147 .It Fl k -kernel Ar kernel
148 The path to and name of the kernel.
149 .It Fl l -loader Ar loader
150 The path to and name of the loader.
151 .It Fl L -label Ar label
152 An optional description for the method.
159 .It Fl N -delete-bootnext
163 .It Fl o -bootorder Ar bootorder
166 variable to the given comma delimited set of
168 The numbers are in hex to match
169 .Cm Boot Ns Em XXXX ,
170 but may omit leading zeros.
171 .It Fl t -set-timeout Ar timeout
172 Set the bootmenu timeout value.
173 .It Fl T -del-timeout
178 Display the device path of boot entries in the output.
181 To display the current
183 related variables in the system:
187 This will display the optional
191 (currently booted method), followed by the optional
195 that may be set, followed finally by all currently defined
197 variables, active or not.
200 augments this output with the disk partition uuids,
201 size/offset and device-path of the variable.
202 The flag will also include any unreferenced (by BootOrder) variables.
206 program can be used to create new EFI boot variables.
207 The following command may be used to create a new boot method, using
208 the EFI partition mounted under
210 mark the method active, using
211 the given loader and label the method
214 .Dl efibootmgr -a -c -l /mnt/EFI/freebsd/loader.efi -L FreeBSD-11
216 This will result in the next available bootnum being assigned to a
217 new UEFI boot variable, and given the label
221 .Dl Boot0009 FreeBSD-11
223 Note newly created boot entries are, by default, created inactive, hence
226 flag is specified above so that it will be considered for booting.
227 The active state is denoted by a '*' following the
230 They are also inserted into the first position of current
232 variable if it exists.
233 They must first be set to active before being considered available to attempt
234 booting from, else they are ignored.
236 .Dl efibootmgr -B -b 0009
238 Will delete the given boot entry Boot0009.
240 To set the given boot entry active:
242 .Dl efibootmgr -a -b 0009
244 To set a given boot entry to be used as the
246 variable, irrespective of its active state, use:
248 .Dl efibootmgr -n -b 0009
252 for the next reboot use:
254 .Dl efibootmgr -o 0009,0003,...
261 The Unified Extensible Firmware Interface Specification is available