doc(ZFS): update UEFI loader instructions for 13+
FreeBSD 13.0+ no longer have boot1.efifat, so replace those instructions with the relevant commands and add reference to loader.efi man page.
Any news with this patch? @jrtc27 @msimerson
The current instructions are still completely broken for supported versions of FreeBSD.
This patch makes them much less broken, but only for the vast majority of FreeBSD users. My interest in improving the docs has been exhausted by perfect standing in the way of better.
The current instructions are still completely broken for supported versions of FreeBSD.
This patch makes them much less broken, but only for the vast majority of FreeBSD users. My interest in improving the docs has been exhausted by perfect standing in the way of better.
No. The instructions you have provided do not work for the vast majority of FreeBSD users, because they only update the removable media path, which is not what a normal desktop/server installed via bsdinstall will be using.
Open bugs reports include:
- 255318 – handbook: Document how to update the bootloader
- 263322 – Explain when and why to upgrade the bootloader
https://github.com/freebsd/freebsd-doc/pull/408#issuecomment-2600971408
… My interest in improving the docs has been exhausted …
@msimerson if it helps you to feel better about the difficulties with documenting things such as this: for a (very) long time, I did things wrong because my brain switched off after efibootmgr -v in 2023 produced nothing like what's shown under https://www.freebsd.org/releases/14.0R/relnotes/#upgrade.
My own routine includes this, whilst an upgraded but not yet active boot environment is mounted at /tmp/up:
cp /tmp/up/boot/loader.efi /boot/efi/efi/freebsd/loader.efi && cp /tmp/up/boot/loader.efi /boot/efi/efi/boot/bootx64.efi
I do a similar thing, but I always add /etc/fstab entries with noauto for every one of the disks that has boot loaders. Eg:
➜ grep efi /etc/fstab
/dev/gpt/nda0-efi /boot/efi msdosfs rw,noauto 2 2
/dev/gpt/nda1-efi /boot/efi msdosfs rw,noauto 2 2
I mostly run FreeBSD on servers with mirrored boot disks and those fstab entries are my reminder to update the boot loader on both disks. They also make this little saved snippet work:
df /boot/efi | grep /boot/efi && umount /boot/efi
for _fs in $(grep efi /etc/fstab | awk '{ print $1 }'); do
mount -t msdosfs -o longnames $_fs /boot/efi
cp /boot/loader.efi /boot/efi/efi/boot/boot*.efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi
done