Re: Loader needs to be updated message

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 06 Sep 2024 22:13:59 UTC
void <void_at_f-m.fm> wrote on
Date: Fri, 06 Sep 2024 18:12:10 UTC :
 
> On Fri, Sep 06, 2024 at 09:00:58AM -0600, Warner Losh wrote:
> 
> >man loader.efi has the instructions.
> 
> I followed the instructions:
> 
> # gpart list | grep -Ew '(Name|efi)'
> 1. Name: da0p1
> type: efi
> 2. Name: da0p2
> 3. Name: da0p3
> 1. Name: da0
> 
> The manpage says:
> 
> " Second, let's mount the ESP, copy loader.efi to the special location
> reserved for FreeBSD EFI loaders, and unmount once finished:
> 
> # mount_msdosfs /dev/nvd0p1 (my system would be da0p1) /boot/efi
> # cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
> # umount /boot/efi
> "
> 
> However, on this system, /boot/efi is mounted at boot-time so I just copied it over.
> 
> ( /dev/gpt/efiboot0 on /boot/efi (msdosfs, local) )
> 
> I first checked to make sure the file being copied over was newer and the right type
> 
> file /boot/loader.efi
> /boot/loader.efi: PE32+ executable (EFI application) Aarch64, for MS Windows, 2 sections
> 
> ls -lah /boot/loader.efi
> -r-xr-xr-x 2 root wheel 824K 6 Sep 14:47 /boot/loader.efi*
> 
> file /boot/efi/efi/freebsd/loader.efi
> /boot/efi/efi/freebsd/loader.efi: PE32+ executable (EFI application) Aarch64, for MS Windows, 2 sections
> 
> ls -lah /boot/efi/efi/freebsd/loader.efi
> -rwxr-xr-x 1 root wheel 830K 25 Jul 07:58 /boot/efi/efi/freebsd/loader.efi*
> 
> copied it over, rebooted, but the error message persists. Do you have any other suggestions
> please? thanks

What shows if you do the likes of (showing an amd64 context example):

# ls -lah /boot/efi/efi/*/*
-r-xr-xr-x  1 root wheel  643K Aug 24 05:32 /boot/efi/efi/BOOT/bootx64.efi
-rwxr-xr-x  1 root wheel  643K Aug 24 05:32 /boot/efi/efi/FREEBSD/loader.efi

If one is old, then it is probably the one actually being used.
(The name bootx64.efi is amd64 specific: other platforms use
other names.)

In such a case, you might need something like:

# cp -a /boot/loader.efi /boot/efi/efi/BOOT/bootx64.efi


===
Mark Millard
marklmi at yahoo.com