Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/efibootmgr/efibootmgr.8
Show All 22 Lines | |||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd December 28, 2018 | .Dd December 28, 2018 | ||||
.Dt EFIBOOTMGR 8 | .Dt EFIBOOTMGR 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm efibootmgr | .Nm efibootmgr | ||||
.Nd manipulate the EFI Boot Manager | .Nd manipulate the EFI Boot Manager | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Op Fl aAnNB | .Nm | ||||
.Op Fl aABcDnNTv | |||||
.Op Fl b Ar bootnum | .Op Fl b Ar bootnum | ||||
.Op Fl t Ar timeout | .Op Fl k Ar kernel | ||||
.Op Fl T | .Op Fl l Ar loader | ||||
.Op Fl L Ar label | |||||
.Op Fl o Ar bootorder | .Op Fl o Ar bootorder | ||||
.Op Fl v | .Op Fl t Ar timeout | ||||
.Op Fl c l Ar loader [ Fl k Ar kernel ] [ Fl L Ar label ] [ Fl -dry-run ] | |||||
.Sh "DESCRIPTION" | .Sh "DESCRIPTION" | ||||
.Nm | .Nm | ||||
manipulates how UEFI Boot Managers boot the system. | manipulates how UEFI Boot Managers boot the system. | ||||
Methods of booting can be created and destroyed. | Methods of booting can be created and destroyed. | ||||
Boot methods can be activated or deactivated. | Boot methods can be activated or deactivated. | ||||
The order of boot methods tried can be changed. | The order of boot methods tried can be changed. | ||||
Temporary boot methods can override the usual booting methods. | Temporary boot methods can override the usual booting methods. | ||||
.Pp | .Pp | ||||
The UEFI standard defines how hosts may control what is used to | The UEFI standard defines how hosts may control what is used to | ||||
bootstrap the system. | bootstrap the system. | ||||
Each method is encapsulated within a persistent UEFI variable, stored | Each method is encapsulated within a persistent UEFI variable, stored | ||||
by the UEFI BIOS of the form | by the UEFI BIOS of the form | ||||
.Va BootXXXX . | .Cm Boot Ns Em XXXX . | ||||
These variables are numbered, describe where to load the bootstrap | These variables are numbered, describe where to load the bootstrap | ||||
program from, and whether or not the method is active. | program from, and whether or not the method is active. | ||||
The boot order of these methods is controlled by another variable | The boot order of these methods is controlled by another variable | ||||
.Va BootOrder . | .Cm BootOrder . | ||||
The currently booting method is communicated using | The currently booting method is communicated using | ||||
.Va BootCurrent . | .Cm BootCurrent . | ||||
A global timeout can also be set. | A global timeout can also be set. | ||||
.Pp | .Pp | ||||
.Nm | .Nm | ||||
requires that the kernel efirt module be loaded to get and set these | requires that the kernel efirt module be loaded to get and set these | ||||
non-volatile variables. | non-volatile variables. | ||||
.Pp | .Pp | ||||
The following options are available: | The following options are available: | ||||
.Bl -tag -width 28m | .Bl -tag -width Ds | ||||
.It Fl c Fl -create | .It Fl a -activate | ||||
Create a new Boot Variable | Activate the given | ||||
.It Fl l -loader Ar loader | .Ar bootnum | ||||
The path to and name of the loader. | boot entry, or the new entry when used with | ||||
.It Fl k -kernel Ar kernel | .Fl c . | ||||
The path to and name of the kernel. | .It Fl A -deactivate | ||||
Deactivate the given | |||||
.Ar bootnum | |||||
boot entry. | |||||
.It Fl b -bootnum Ar bootnum | .It Fl b -bootnum Ar bootnum | ||||
When creating or modifying an entry, use bootnum as the index. | When creating or modifying an entry, use | ||||
.Ar bootnum | |||||
as the index. | |||||
When creating a new entry, fail if it already exists. | When creating a new entry, fail if it already exists. | ||||
.It Fl L -label Ar label | .It Fl B -delete | ||||
An optional description for the entry. | Delete the given | ||||
.Ar bootnum | |||||
boot entry. | |||||
.It Fl c -create | |||||
Create a new | |||||
.Cm Boot | |||||
variable. | |||||
.It Fl D -dry-run | .It Fl D -dry-run | ||||
Process but do not change any variables. | Process but do not change any variables. | ||||
.It Fl B -delete | .It Fl k -kernel Ar kernel | ||||
Delete the given bootnum boot entry. | The path to and name of the kernel. | ||||
.It Fl a -activate | .It Fl l -loader Ar loader | ||||
Activate the given bootnum boot entry, or the new entry when used with -c. | The path to and name of the loader. | ||||
.It Fl A -deactivate | .It Fl L -label Ar label | ||||
Deactivate the given bootnum boot entry. | An optional description for the entry. | ||||
.It Fl n -bootnext | .It Fl n -bootnext | ||||
Set bootnum boot entry as the BootNext variable. | Set | ||||
.Ar bootnum | |||||
boot entry as the | |||||
.Cm BootNext | |||||
variable. | |||||
.It Fl N -delete-bootnext | .It Fl N -delete-bootnext | ||||
Delete the BootNext optional variable. | Delete the | ||||
.Cm BootNext | |||||
optional variable. | |||||
.It Fl o -bootorder Ar bootorder | .It Fl o -bootorder Ar bootorder | ||||
Set BootOrder variable to the given comma delimited set of bootnums. | Set | ||||
The numbers are in hex to match BootXXXX, but may omit leading zeros. | .Cm BootOrder | ||||
variable to the given comma delimited set of | |||||
.Ar bootnum Ns s . | |||||
The numbers are in hex to match | |||||
.Cm Boot Ns Em XXXX , | |||||
but may omit leading zeros. | |||||
.It Fl t -set-timeout Ar timeout | .It Fl t -set-timeout Ar timeout | ||||
Set the bootmenu timeout value. | Set the bootmenu timeout value. | ||||
.It Fl T -del-timeout | .It Fl T -del-timeout | ||||
Delete the BootTimeout variable. | Delete the | ||||
.Cm BootTimeout | |||||
variable. | |||||
.It Fl v -verbose | .It Fl v -verbose | ||||
Display the device path of boot entries in the output. | Display the device path of boot entries in the output. | ||||
.El | .El | ||||
.Pp | |||||
.Sh Examples | .Sh Examples | ||||
To display the current | |||||
.Cm Boot | |||||
related variables in the system: | |||||
.Pp | .Pp | ||||
To display the current Boot related variables in the system: | |||||
.Pp | |||||
.Dl efibootmgr [-v] | .Dl efibootmgr [-v] | ||||
.Pp | .Pp | ||||
This will display the optional BootNext bootnum, BootCurrent, | This will display the optional | ||||
or currently booted bootnum, followed by the optional Timeout value, any | .Cm BootNext | ||||
BootOrder that may be set, followed finally by all currently defined Boot | bootnum, | ||||
variables, active or not. The verbose flag will augment this output with | .Cm BootCurrent , | ||||
the disk partition uuids, size/offset and device-path of the | or currently booted bootnum, followed by the optional | ||||
variable. | .Cm Timeout | ||||
value, any | |||||
.Cm BootOrder | |||||
that may be set, followed finally by all currently defined | |||||
.Cm Boot | |||||
variables, active or not. | |||||
The verbose flag will augment this output with the disk partition uuids, | |||||
size/offset and device-path of the variable. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
program can be used to create new EFI boot variables. To create a new | program can be used to create new EFI boot variables. | ||||
boot var pointing to an installation with its EFI partition mounted | To create a new boot var pointing to an installation with its EFI partition | ||||
under /mnt, the given loader and a label "FreeBSD-11": | mounted under | ||||
.Pa /mnt , | |||||
the given loader and a label | |||||
.Qq FreeBSD-11 : | |||||
.Pp | .Pp | ||||
.Dl efibootmgr -c -l /mnt/EFI/freebsd/loader.efi -L FreeBSD-11 | .Dl efibootmgr -c -l /mnt/EFI/freebsd/loader.efi -L FreeBSD-11 | ||||
.Pp | .Pp | ||||
This will result in the next available bootnum being assigned to a | This will result in the next available bootnum being assigned to a | ||||
new UEFI boot variable, and given the label "FreeBSD-11" such as: | new UEFI boot variable, and given the label | ||||
.Qq FreeBSD-11 | |||||
such as: | |||||
.Pp | .Pp | ||||
.Dl Boot0009 FreeBSD-11 | .Dl Boot0009 FreeBSD-11 | ||||
.Pp | .Pp | ||||
Note newly created boot entries are created inactive. The active state is denoted | Note newly created boot entries are created inactive. | ||||
by an '*' following the BootXXXX name in the output. They are also inserted | The active state is denoted by an '*' following the | ||||
into the first position of current BootOrder variable if it exists. They | .Cm Boot Ns Em XXXX | ||||
must first be set to active before being considered available to attempt booting from, else they | name in the output. | ||||
are ignored. | They are also inserted into the first position of current | ||||
.Cm BootOrder | |||||
variable if it exists. | |||||
They must first be set to active before being considered available to attempt | |||||
booting from, else they are ignored. | |||||
.Pp | .Pp | ||||
.Dl efibootmgr -B -b 0009 | .Dl efibootmgr -B -b 0009 | ||||
.Pp | .Pp | ||||
Will delete the given boot entry Boot0009 | Will delete the given boot entry Boot0009. | ||||
.Pp | .Pp | ||||
To set a given newly created boot entry active use: | To set a given newly created boot entry active use: | ||||
.Pp | .Pp | ||||
.Dl efibootmgr -a -b 0009 | .Dl efibootmgr -a -b 0009 | ||||
.Pp | .Pp | ||||
To set a given boot entry to be used as the BootNext variable, irrespective | To set a given boot entry to be used as the | ||||
of its active state, use: | .Cm BootNext | ||||
variable, irrespective of its active state, use: | |||||
.Pp | .Pp | ||||
.Dl efibootmgr -n -b 0009 | .Dl efibootmgr -n -b 0009 | ||||
.Pp | .Pp | ||||
To set the BootOrder for the next reboot use: | To set the | ||||
.Cm BootOrder | |||||
for the next reboot use: | |||||
.Pp | .Pp | ||||
.Dl efibootmgr -o 0009,0003,... | .Dl efibootmgr -o 0009,0003,... | ||||
.Pp | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr efivar 8 , | .Xr efivar 8 , | ||||
.Xr uefi 8 , | .Xr gpart 8 , | ||||
.Xr gpart 8 | .Xr uefi 8 |