Efibootmgr

The efibootmgr application interacts with the UEFI firmware on the system, and is a popular tool to manipulate the EFI settings in order to create and manage boot entries that are capable of booting Linux (or other operating systems).

EFIbootmgr is not a boot loader
The application is not a boot loader. It is a tool that interacts with the EFI firmware of the system, which itself is acting as a boot loader. With the efibootmgr application, boot entries can be created, reshuffled and updated.

Configuration
The application does not require any configuration. All that is needed is to install it.

However, in order to successfully use the efibootmgr application, the EFI variables file system must be accessible. This requires that the system is already booted with EFI (and not through the BIOS) as otherwise the EFI variables themselves are not accessible.

If it is not mounted yet (it should be mounted through the init script), it is possible to manually mount it like so:

Listing boot entries
To list the current boot entries, just use efibootmgr. Use the  option to get some additional information:

Creating a boot entry
To create an EFI boot entry, a couple of arguments are passed to efibootmgr:


 * to create a new entry;
 * followed by the partition number on which the EFI System Partition is hosted;
 * followed by the disk on which the EFI System Partition is hosted;
 * followed by the label to use as the boot entry;
 * followed by the path of the EFI image to boot

For instance:

Deleting a boot entry
Before deleting an entry, first figure out what ID the entry has.

To delete the Gentoo entry as shown above (which has Boot0002 as the identifier), ask efibootmgr to delete the entry with id 2, passing the arguments  with the identifier, and   to delete the entry: