efibootbgr
Manage UEFI boot entries
TLDR
List the current settings / bootnums
List the filepaths
Add UEFI Shell v2 as a boot option
Change the current boot order
Delete a boot option
SYNOPSIS
efibootmgr [options] [variable]
PARAMETERS
-v
Displays verbose output, showing more detailed information about EFI variables and operations.
-c
Creates a new boot entry. This option requires additional parameters like -L, -l, -d, and -p to define the entry's properties.
-b <bootnum>
Selects a specific boot entry by its hexadecimal number (e.g., 0001) for modification or deletion.
-B
Deletes the specified boot entry. Must be used in conjunction with -b.
-D
Deletes the specified boot entry and also removes any duplicate entries found.
-L <label>
Sets the label (human-readable description) for a new or existing boot entry.
-l <path_to_bootloader>
Specifies the path to the bootloader executable on the EFI System Partition (e.g., \EFI\debian\shimx64.efi).
-d <disk>
Identifies the disk device (e.g., /dev/sda) containing the EFI System Partition (ESP).
-p <part_num>
Specifies the partition number of the EFI System Partition on the given disk (e.g., 1).
-u
Updates an existing boot entry with new information provided by other options.
-o <order_list>
Sets the boot order as a comma-separated list of hexadecimal boot entry numbers (e.g., 0001,0003,0000).
-a
Sets the specified boot entry as active (bootable).
-A
Sets the specified boot entry as inactive (not bootable).
-q
Enables quiet output, suppressing most informational messages.
-r
Removes duplicate boot entries, retaining only the first instance.
-N
Non-volatile mode. Reads or writes information without making permanent changes to NVRAM. Useful for testing.
-E
Dumps the contents of the EFIVARS (EFI variables) to standard output.
-S
Lists available boot entries and their details without attempting to write any changes.
DESCRIPTION
The command efibootbgr is not a standard Linux command and likely a typo. It is highly probable that the intended command was efibootmgr, a widely used utility for managing UEFI (Unified Extensible Firmware Interface) Boot Manager entries.
efibootmgr provides a command-line interface to interact with the UEFI firmware's NVRAM (Non-Volatile RAM) to view, create, delete, and reorder boot entries. These entries are pointers to bootloaders (such as GRUB) located on the EFI System Partition (ESP). This functionality is essential for modern systems that utilize UEFI instead of traditional BIOS, facilitating tasks like dual-booting multiple operating systems, repairing boot issues, or setting up custom boot environments.
By directly manipulating the UEFI boot variables, efibootmgr gives users precise control over how their system boots, making it an indispensable tool for advanced boot management and troubleshooting on UEFI-based Linux installations.
CAVEATS
The command efibootbgr does not exist as a standard Linux utility. The analysis above pertains to efibootmgr.
When using efibootmgr, ensure your system uses UEFI firmware and has an EFI System Partition (ESP).
Incorrect usage of efibootmgr can lead to an unbootable system; always proceed with caution and consider backing up your configuration.
This command typically requires superuser privileges (e.g., using sudo) to operate on UEFI variables.
efibootmgr manages the pointers to bootloaders in UEFI, not the bootloaders themselves. Ensure your bootloader (like GRUB) is correctly installed on the ESP.
EFI SYSTEM PARTITION (ESP)
The EFI System Partition (ESP) is a crucial, FAT-formatted partition (typically FAT16 or FAT32) on GPT-partitioned disks used by UEFI systems. It stores UEFI applications, bootloaders (e.g., GRUB's EFI executables), and driver files. efibootmgr's primary function is to create and manage UEFI boot entries that point to these executables within the ESP.
UEFI VS. BIOS
UEFI (Unified Extensible Firmware Interface) is the modern firmware standard designed to replace the legacy BIOS (Basic Input/Output System). UEFI offers numerous advantages including support for larger disks (GPT), faster boot times, secure boot, and a more flexible boot process. efibootmgr is specifically designed to interact with UEFI systems and has no functionality on older BIOS-only machines.
HISTORY
The efibootmgr utility was developed as an essential component for Linux systems to fully support UEFI, which succeeded traditional BIOS as the standard firmware interface. As UEFI systems became prevalent, a user-space tool was needed to interact with the UEFI Boot Manager's entries stored in NVRAM.
Part of the broader efibootmgr package, its development enabled Linux distributions to properly manage boot options on modern hardware, facilitating tasks like secure boot configuration and complex multi-boot setups. It provides a direct interface to manipulate EFI variables, which was a significant advancement over BIOS-centric boot management tools.