Re: Updating EFI boot loader results in boot hangup

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Fri, 12 Aug 2022 20:48:41 UTC
From: Nuno Teixeira <eduardo@freebsd.org>
Subject: Re: Updating EFI boot loader results in boot hangup
Date: Fri, 12 Aug 2022 21:03:02 +0100

> I'm searching without success to load a bkp loader in case of boot failure.
> 
> Upgrade process willl be like:
> ---
> mount -t msdosfs /dev/nvd0p1 /mnt
> cp /mnt/efi/boot/bootx64.efi /mnt/efi/boot/bootx64.old
> cp /boot/loader.efi /mnt/efi/boot/bootx64.efi
> ---
> 
> I can't find the right docs to load bootx64.old.
> Could you tell me what you did to solve your boot?
> 
> Thanks

I use VirturalBox to run 14-CURRENT system. UEFI BIOS of VirtualBox
provides a way to select loader file and boot from it. So I take
following steps when updating loader file.

1. cd /boot/efi/efi/freebsd
2. mv loader.efi loader.backup.efi
3. cp -a /boot/loader.efi .

And when boot from new loader file fails, I enter UEFI BIOS, select
loader.backup.efi and boot from it.

As you can see, above way depends on the feature of VirturalBox. So
it depends on your hardware whether or not you can adopt it. As Larry
pointed out, surest way is to boot from install media such as memstick
or cdrom.

---
Yasuhiro Kimura