LinuxCommandLibrary

efibootmgr

UEFI boot manager configuration tool

TLDR

List all boot options with their numbers

$ efibootmgr [-u|--unicode]
copy
Add UEFI Shell v2 as a boot option
$ sudo efibootmgr -c -d [/dev/sda] -p [1] -l "[\path\to\shell.efi]" -L "[UEFI Shell]"
copy
Add Linux as a boot option
$ sudo efibootmgr -c -d [/dev/sda] -p [1] -l "[\vmlinuz]" -u "[kernel_cmdline]" -L "[Linux]"
copy
Change current boot order
$ sudo efibootmgr -o [0002,0008,0001,001A]
copy
Delete a boot option
$ sudo efibootmgr -b [0008] -B
copy

SYNOPSIS

efibootmgr [options]

DESCRIPTION

efibootmgr manipulates the UEFI Boot Manager by modifying EFI variables stored in NVRAM. It can create, delete, and modify boot entries, change boot order, and set the next boot device.
Essential for managing dual-boot systems and UEFI boot configuration.

PARAMETERS

-c, --create

Create a new boot entry
-d, --disk disk
Disk containing the loader
-p, --part part
Partition number on the disk
-l, --loader name
EFI loader filename
-L, --label label
Boot entry label
-o, --bootorder order
Set boot order (comma-separated)
-b, --bootnum num
Boot entry number to operate on
-B, --delete-bootnum
Delete the entry specified by -b
-u, --unicode
Pass command line in Unicode

CAVEATS

Requires root privileges. Modifies UEFI NVRAM variables. Use with caution as incorrect settings can prevent system boot. Backup boot entries before making changes.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community