On Fri, Feb 19, 2021 at 10:26:15PM +0100 I heard the voice of Kurt Jaeger, and lo! it spake thus: > > We do not need it automated. We need it to be described in enough > detail that we can write that BOOTx64.efi to the proper place. If > there are some steps to find out where to write it etc., fine. > Describe those steps.
As a data point, years ago I started dropping a rewrite-bootcode.sh script in /boot on all my systems, 'cuz I could never offhand remember how to do it so I kept putting it off. And I updated a variant of it for EFI. e.g., on one system BIOS-booting system, /boot/rewrite-bootcode.sh: ---------------------------------- #!/bin/sh -x for i in /dev/nda0 /dev/nda1; do gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${i} done ---------------------------------- And on an EFI system, ---------------------------------- #!/bin/sh -ex bd="/mnt/EFI/BOOT" for i in gpt/efi0 gpt/efi1; do mount -t msdosfs /dev/${i} /mnt cp /boot/boot1.efi ${bd}/BOOTX64.EFI echo "BOOTX64.EFI" > ${bd}/STARTUP.NSH umount /mnt done ---------------------------------- Another variant I have on my workstation (which doesn't EFI boot 'cuz DRM, but can, so I'm pretty sure the script works right), --------------------------------- #!/bin/sh cd `dirname $0` SRC="loader.efi" for i in 0 1; do mount /mnt/efi${i} DSTDIR="/mnt/efi${i}/efi/boot" mkdir -p ${DSTDIR} DST="${DSTDIR}/BOOTx64.efi" if(!(cmp ${SRC} ${DST})); then echo "$DST: Updating" cp -p ${SRC} ${DST} else echo "${DST}: Up to date already" fi umount /mnt/efi${i} done --------------------------------- % grep efi /etc/fstab /dev/gpt/nefi0 /mnt/efi0 msdosfs rw,noauto,-g0,-m770 0 0 /dev/gpt/nefi1 /mnt/efi1 msdosfs rw,noauto,-g0,-m770 0 0 --------------------------------- (and yes, when I wrote these, just _figuring_ _out_ WTF EFI wanted and where it wanted it was _incredibly_ frustrating...) Of course, those all take manual setup for each system, to know the devices or labels, and with EFI, to either manually mount or setup fstab entries for whatever partition[s] apply. But at least I get to do it once, when I setup the system, and presumably know what I just did, rather than trying to remember years later while sitting at the console of a system I need to finish the update of and get back up and running. This way I know I can just `cd /boot ; ./rew<tab>` after installworld and be done with it :) -- Matthew Fuller (MF4839) | fulle...@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. _______________________________________________ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"