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
27 .Dd September 24, 2019
32 .Nd manipulate the EFI Boot Manager
65 manipulates how UEFI Boot Managers boot the system.
66 Methods of booting can be created and destroyed.
67 Boot methods can be activated or deactivated.
68 The order of boot methods tried can be changed.
69 Temporary boot methods can override the usual booting methods.
71 The UEFI standard defines how hosts may control what is used to
73 Each method is encapsulated within a persistent UEFI variable, stored
74 by the UEFI BIOS of the form
76 These variables are numbered, describe where to load the bootstrap
77 program from, and whether or not the method is active.
78 The boot order of these methods is controlled by another variable
80 The currently booting method is communicated using
82 A global timeout can also be set.
85 requires that the kernel efirt module be loaded to get and set these
86 non-volatile variables.
88 The following options are available:
93 boot entry, or the new entry when used with
99 .It Fl b -bootnum Ar bootnum
100 When creating or modifying an entry, use
103 When creating a new entry, fail if it already exists.
113 Process but do not change any variables.
114 .It Fl k -kernel Ar kernel
115 The path to and name of the kernel.
116 .It Fl l -loader Ar loader
117 The path to and name of the loader.
118 .It Fl L -label Ar label
119 An optional description for the entry.
126 .It Fl N -delete-bootnext
130 .It Fl o -bootorder Ar bootorder
133 variable to the given comma delimited set of
135 The numbers are in hex to match
136 .Cm Boot Ns Em XXXX ,
137 but may omit leading zeros.
138 .It Fl t -set-timeout Ar timeout
139 Set the bootmenu timeout value.
140 .It Fl T -del-timeout
145 Display the device path of boot entries in the output.
148 To display the current
150 related variables in the system:
154 This will display the optional
158 or currently booted bootnum, followed by the optional
162 that may be set, followed finally by all currently defined
164 variables, active or not.
165 The verbose flag will augment this output with the disk partition uuids,
166 size/offset and device-path of the variable.
170 program can be used to create new EFI boot variables.
171 To create a new boot var pointing to an installation with its EFI partition
174 the given loader and a label
177 .Dl efibootmgr -c -l /mnt/EFI/freebsd/loader.efi -L FreeBSD-11
179 This will result in the next available bootnum being assigned to a
180 new UEFI boot variable, and given the label
184 .Dl Boot0009 FreeBSD-11
186 Note newly created boot entries are created inactive.
187 The active state is denoted by an '*' following the
190 They are also inserted into the first position of current
192 variable if it exists.
193 They must first be set to active before being considered available to attempt
194 booting from, else they are ignored.
196 .Dl efibootmgr -B -b 0009
198 Will delete the given boot entry Boot0009.
200 To set a given newly created boot entry active use:
202 .Dl efibootmgr -a -b 0009
204 To set a given boot entry to be used as the
206 variable, irrespective of its active state, use:
208 .Dl efibootmgr -n -b 0009
212 for the next reboot use:
214 .Dl efibootmgr -o 0009,0003,...