tail head cat sleep
QR code linking to this page

Manual Pages  — EFIBOOTMGR

NAME

efibootmgr – manipulate the EFI Boot Manager

CONTENTS

SYNOPSIS

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

DESCRIPTION

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:
-c --create
  Create a new Boot Variable
-l --loader loader
  The path to and name of the loader.
-k --kernel kernel
  The path to and name of the kernel.
-L --label label
  An optional description for the entry.
-D --dry-run
  Process but do not set the given BootVar.
-B --delete BootVarNum
  Delete the given BootVar Num.
-a --activate BootVarNum
  Activate the given BootVarNum.
-A --deactivate BootVarNum
  Deactivate the given BootVarNum.
-n --bootnext BootVarNum
  Set BootVarNum as the BootNext variable.
-N --delete-bootnext
  Delete the BootNext optional BootVar.
-o --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.
-t --set-timeout timeout
  Set the bootmenu timeout value.
-T --del-timeout
  Delete the BootTimeout variable.
-v --verbose
  Display the device path of BootVars in the output.

Exammples

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 on partition 1 of device ada0 using the given loader with a description FreeBSD-11:

    efibootmgr -c -d ada0 -p 1 -l/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,...

SEE ALSO

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

EFIBOOTMGR (8) December 8, 2017

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock.

C is a language that combines all the elegance and power of assembly language with all the readability and maintainability of assembly language.