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 BootXXXX. These variables are numbered, describe where to load the bootstrap program from, and whether or not the method is active. The boot order of these methods is controlled by another variable BootOrder. The currently booting method is communicated using BootCurrent. A global timeout can also be set.
efibootmgr requires that the kernel efirt module to get and set these non-volatile variables.
The following options are available:
| |
Create a new Boot Variable | |
| |
The path to and name of the loader. | |
| |
The path to and name of the kernel. | |
| |
When creating an entry, use Bootvar as the index. Fail if it already exists. | |
| |
An optional description for the entry. | |
| |
Process but do not set the given BootVar. | |
| |
Delete the given BootVar Num. | |
| |
Activate the given BootVarNum. | |
| |
Deactivate the given BootVarNum. | |
| |
Set BootVarNum as the BootNext variable. | |
| |
Delete the BootNext optional BootVar. | |
| |
Set BootOrder variable to the given comma delimited set of BootVarNums. The numbers are in hex to match BootXXXX, but may omit leading zeros. | |
| |
Set the bootmenu timeout value. | |
| |
Delete the BootTimeout variable. | |
| |
Display the device path of BootVars in the output. | |
To Display the current Boot related variables in the system:
efibootmgr [-v]
This will display the optional BootNext BootVar, BootCurrent, or currently booted BootVar, followed by the optional Timeout value, any BootOrder that maybe set, followed finally by all currently defined Boot variables, active or not. The verbose flag will augment this output with the hardrive partition uuids, size/offset and device-path of the variable.
The efibootmgr program can be used to create new EFI boot variables. To create a new boot var pointing to an installation with its EFI partition mounted under /mnt, the given loader and a label "FreeBSD-11":
efibootmgr -c -l /mnt/EFI/BOOT/BOOTX64.EFI -L FreeBSD-11
This will result in the next available BootVarNum being assigned to a new UEFI load variable, and given the label "FreeBSD-11" such as:
Boot0009 FreeBSD-11
Note newly created BootVars are created inactive. The active state is denoted by an '*' following the BootVar name in the output. They are also inserted into the first position of current BootOrder variable if it exists. They must first be set to active before being considered available to attempt booting from, else they are ignored.
efibootmgr -B 0009
Will delete the given BootVar Boot0009
To set a given newly created BootVar active use:
efibootmgr -a 0009
To set a given BootVar to be used as the BootNext variable, irrespective of its active state, use:
efibootmgr -n 0009
To set the BootOrder for the next reboot use:
efibootmgr -o 0009,0003,...
EFIBOOTMGR (8) | May 8, 2018 |
Main index | Section 8 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | The number of UNIX installations has grown to 10, with more expected. | ” |
— UNIX Programming Manual, 1972 |