freebsd-doc icon indicating copy to clipboard operation
freebsd-doc copied to clipboard

doc(ZFS): update UEFI loader instructions for 13+

Open msimerson opened this issue 1 year ago • 5 comments

FreeBSD 13.0+ no longer have boot1.efifat, so replace those instructions with the relevant commands and add reference to loader.efi man page.

msimerson avatar Aug 27 '24 22:08 msimerson

Any news with this patch? @jrtc27 @msimerson

sergio-carlavilla avatar Jan 18 '25 09:01 sergio-carlavilla

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.

msimerson avatar Jan 19 '25 18:01 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.

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.

jrtc27 avatar Jan 19 '25 18:01 jrtc27

Open bugs reports include:

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

grahamperrin avatar Mar 19 '25 03:03 grahamperrin

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

msimerson avatar Mar 20 '25 02:03 msimerson