 
| Main index | Section 8 | Options | 
The UEFI standard defines how hosts may control what is used to bootstrap the system. Each method is encapsulated within a persistent UEFI variable, stored by the UEFI BIOS of the form Boot XXXX (where XXXX are uppercase hexadecimal digits). These variables are numbered, each describing where to load the bootstrap program from, and whether or not the method is active (used for booting, otherwise the method will be skipped). The order of these methods is controlled by another variable, BootOrder. The currently booted method is communicated using BootCurrent. A global timeout can also be set.
efibootmgr requires that the kernel module efirt(9) module be present or loaded to get and set these non-volatile variables.
The following options are available:
|  | |
| Activate the given
bootnum
boot entry, or the new entry when used with | |
|  | |
| Deactivate the given bootnum boot entry. | |
|  | |
| When creating or modifying an entry, use bootnum as the index. When creating a new entry, fail if it already exists. | |
|  | |
| Delete the given bootnum boot entry. | |
|  | |
| Create a new Boot variable (aka method or entry). | |
|  | |
| Process but do not change any variables. | |
|  | |
| Print the
FreeBSD 
path to the ESP device, derived from the EFI variables
 BootCurrent
and
 BootXXXX.
This is the ESP partition used by UEFI to boot the current
instance of the system.
If | |
|  | |
| Set or clear the request to the system firmware to stop in its user interface on the next boot. | |
|  | |
| The path to and name of the kernel. | |
|  | |
| The path to and name of the loader. | |
|  | |
| An optional description for the method. | |
|  | |
| Set bootnum boot entry as the BootNext variable. | |
|  | |
| Delete the BootNext optional variable. | |
|  | |
| Set BootOrder variable to the given comma delimited set of bootnums. The numbers are in hex to match Boot XXXX, but may omit leading zeros. | |
|  | |
| Set the bootmenu timeout value. | |
|  | |
| Delete the BootTimeout variable. | |
|  | |
| Displays the UEFI device path of unix-path. | |
|  | |
| Display the device path of boot entries in the output. | |
efibootmgr -v
This will display the optional
 BootNext
(if present),
 BootCurrent
(currently booted method), followed by the optional
 Timeout
value, any
 BootOrder
that may be set, followed finally by all currently defined
 Boot
variables, active or not.
The verbose flag,
(
The efibootmgr program can be used to create new EFI boot variables. The following command may be used to create a new boot method, using the EFI partition mounted under /boot/efi, mark the method active, using the given loader and label the method "FreeBSD-11":
efibootmgr -a -c -l /boot/efi/EFI/freebsd/loader.efi -L FreeBSD-11
This will result in the next available bootnum being assigned to a new UEFI boot variable, and given the label "FreeBSD-11" such as:
Boot0009 FreeBSD-11
Note newly created boot entries are, by default, created inactive, hence
the reason
efibootmgr -B -b 0009
Will delete the given boot entry Boot0009.
To set the given boot entry active:
efibootmgr -a -b 0009
To set a given boot entry to be used as the BootNext variable, irrespective of its active state, use:
efibootmgr -n -b 0009
To set the BootOrder for the next reboot use:
efibootmgr -o 0009,0003,...
| EFIBOOTMGR (8) | February 15, 2023 | 
 
| Main index | Section 8 | Options | 
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
