man.bsd.lv manual page server

Manual Page Search Parameters

EFIBOOTMGR(8) System Manager's Manual EFIBOOTMGR(8)

efibootmgrmanipulate the EFI Boot Manager

[-aAnNB Bootvar] [-t timeout] [-T] [-o bootorder] [-verbose] [-c --k kernel -l loader [-L label] [--dry-run] [-b Bootvar]]

efibootmgr manipulates how UEFI Boot Managers boot the system. Methods of booting can be created and destroyed. Boot methods can be activated or deactivated. The order of boot methods tried can be changed. Temporary boot methods can override the usual booting methods.

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
Create a new Boot Variable
--loader loader
The path to and name of the loader.
--kernel kernel
The path to and name of the kernel.
-Bootvar
When creating an entry, use Bootvar as the index. Fail if it already exists.
--label label
An optional description for the entry.
--dry-run
Process but do not set the given BootVar.
--delete BootVarNum
Delete the given BootVar Num.
--activate BootVarNum
Activate the given BootVarNum.
--deactivate BootVarNum
Deactivate the given BootVarNum.
--bootnext BootVarNum
Set BootVarNum as the BootNext variable.
--delete-bootnext
Delete the BootNext optional BootVar.
--bootorder bootorder
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-timeout timeout
Set the bootmenu timeout value.
--del-timeout
Delete the BootTimeout variable.
--verbose
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,...

efivar(8), uefi(8), gpart(8)

May 8, 2018 FreeBSD-12.0