Forrest logo
back to the efibootmgr tool

efibootmgr:tldr:12437

efibootmgr: Add UEFI Shell v2 as a boot option.
$ sudo efibootmgr -c -d ${-dev-sda1} -l ${\EFI\tools\Shell-efi} -L "${UEFI Shell}"
try on your machine

This command is meant to be run on a Linux system with Secure Boot enabled. Let's break it down:

  • sudo: This command is used to execute the subsequent command with superuser privileges, typically requiring administrator authentication.

  • efibootmgr: This is a Linux utility for managing EFI boot entries. EFI boot entries determine the boot options available on a system.

  • -c: This option tells efibootmgr to create a new EFI boot entry.

  • -d ${-dev-sda1}: This option specifies the disk on which the EFI system partition (ESP) is located. ${-dev-sda1} is a placeholder for the actual device identifier, in this case, /dev/sda1. The ESP is a partition on the disk that stores EFI boot loaders and related files.

  • -l ${\EFI\tools\Shell-efi}: This option specifies the path to the EFI boot loader file that will be used for booting. ${\EFI\tools\Shell-efi} is a placeholder for the actual file path, likely referring to a UEFI Shell boot loader located at EFI\tools\Shell-efi on the ESP.

  • -L "${UEFI Shell}": This option sets the boot entry's descriptive label. "${UEFI Shell}" is a placeholder for the actual label, which could be something like "UEFI Shell".

By running this command, a new EFI boot entry will be created using the specified disk, EFI boot loader, and label. This can be useful for manually adding boot options or troubleshooting boot-related issues.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the efibootmgr tool