| EFI(8) | System Manager's Manual | EFI(8) |
efi — UEFI
variable editor
efi |
[-CcDFfhNOqrTVvy]
[--brief]
[--debug[=num]]
[-@ file]
[-A [hexnum]]
[-a [hexnum]]
[-B [hexnum]]
[-b hexnum]
[-d disk]
[-G [dev]]
[-L label]
[-l loader]
[-n hexnum]
[-o
hexnum[,hexnum
...]] [-p num]
[-R regexp]
[-t seconds]
[-w [sig]]
[-X
hexnum[,hexnum
...]] [-x
hexnum[,hexnum
...]] |
efi can display all UEFI variables visible
at runtime. It can also create, modify, and delete boot related variables
such as Boot####, BootOrder,
BootNext, Driver####,
DriverOrder, SysPrep####, and
SysPrepOrder. It is designed to be API compatible with
efibootmgr in Linux, so that
grub can be installed from
NetBSD. Future features may be coming.
Many efi options require a number
(####) indicating which
“Boot####” argument to modify. Many
options take this as an argument, but it can also be set with the
-b option. Note that the boot number is a
hexadecimal in the range of 0 to 0xFFFF. It need not have a leading
‘0x’ prefix and it need not be zero padded to 4 hexdigits. By
default, the boot number specifies the
“Boot####” variable, but the
-r and -y options can
override this so that it applies to the
“Driver####” and
“SysPrep####” variables.
The following options are currently available:
--brief<sys/efiio.h>). This is
used when the structure of the data is not known by
efi.--debug[=num]--brief).-@,
--append-binary-args-’ for
stdin) to the variable data. This data is passed to the boot loader on its
command line.-A,
--inactive [####]-a,
--active [####]-B,
--delete-bootnum [####]-b,
--bootnum ####-C,
--create-only-c,
--create-C, but add the bootnum to the
bootorder.-D,
--remove-dups-d,
--disk [dev]-F,
--no-reconnect-f,
--reconnect-G,
--show-gpt [dev]-L,
--label LABELNetBSD’.-l,
--loader NAME-N,
--delete-bootnext-n,
--bootnext ####-O,
--delete-bootorder-o,
--bootorder
####[,####
...]-p,
--part PART-q,
--quiet-r,
--driver-T,
--delete-timeout-t,
--timeout secs-V,
--versiongrub-install happy, this is currently set to
version 18.-v,
--verbose-G and
-w options.-w,
--write-signature [sig]-c.-X,
--remove-bootorder
####[,####
...]-x,
--prefix-bootorder
####[,####
...]-y,
--sysprepefi requires kernel EFI runtime support
and the device /dev/efi. Currently,
efi only runs on little-endian machines, as required
by the UEFI specification.
As of grub-install 2.12, the following
efibootmgr options are used (see
grub-2.12/grub-core/osdep/unix/platform.c):
-B-L
efi_distributor-b
bootnum-c-d
efidir_disk-l
efifile_path-p
efidir_part_idx-q-w--versionCurrently, the following efibootmgr
options are not implemented in efi:
-E,
--edd-device-e,
--edd-e,
--edd30--file-dev-path--full-dev-path-g,
--gpt-i,
--iface-M,
--mirror-above-4G-m,
--mirror-below-4G-u,
--unicode, --UCS-2The following options in efi are not in
efibootmgr:
In addition, several of the supported
efibootmgr options now take optional arguments or
comma delimited hex number arguments for convenience.
efi attempts to follow version 2.10 Errata
A (Aug 8, 2024) of the UEFI Specification
(http://uefi.org).
efi was intended to be a
NetBSD replacement for
efibootmgr in Linux. The later is required by
grub-install in the grub
package. As a result, the interface is the same with a few exceptions. For
efi to be used with
grub-install it obviously needs to be renamed or
linked to efibootmgr.
Probably way too many to list. Currently,
efi has had very limited testing. Use it at your own
risk!
| February 23, 2025 | NetBSD 11.0 |