Update EFI boot entries with UEFI shell

Revision history
Tags: uefi


The motherboard on my Lenovo T470P was replaced and in that process I (naturally) lost my UEFI boot entries. I wanted them back.

Add a new entry with UEFI Shell

I used the Arch Linux installation media on a USB stick to get access to a UEFI shell. Download the Arch .iso from ArchLinux.org downloads and drop it on a USB stick your favorite tool. I use dd if=arch.iso of=/dev/sdX bs=4M status=progress.

Boot it up and the initial menu should give you some different options

From that list, enter UEFI Shell v2, and you should be dumped into the shell. The initial output shows you the different file systems and block devices it sees.

On my computer, the USB device I’m booting from is FS0 and my actual EFI partition on my physical drive is FS1. You can look through the file systems by writing e.g. FS1:, then use ls and cd to browse your way around.

I determined that my EFI image was at FS1:\EFI\grub\grubx64.efi, so I created a new boot entry for that path. The program takes care of mapping FS1 to a GUID for you. The last argument to the command below is an arbitrary friendly name of the EFI boot entry. Since I’m referencing a GRUB image, I might as well call it grub.

FS1:\> bcfg boot add 0 fs1:\EFI\grub\grubx64.efi grub
Target = 0000
bcfg: Add Boot0000 as 0

List all boot entries (-v verbose, -b paged)

bcfg boot dump -v -b

Looks good to me, so I’ll reboot

FS1:\> reset

Hope it worked ;)



If you have any comments or feedback, please send me an e-mail. (stig at stigok dotcom).

Did you find any typos, incorrect information, or have something to add? Then please propose a change to this post.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.