Re: UEFI question

From: Alan Somers <asomers_at_freebsd.org>
Date: Tue, 22 Nov 2022 18:42:36 UTC
On Tue, May 31, 2022 at 9:27 AM John Kennedy <warlock@phouka.net> wrote:
>
> On Tue, May 31, 2022 at 02:32:21PM +0200, Julien Cigar wrote:
> > I have a Dell R340 server on which installed a 13.0-RELEASE and then
> > upgraded to 13.1-RELEASE (through freebsd-update). ZFS is used (raidz2).
> >
> > The system has the following partitions: https://gist.github.com/silenius/2defdd5480c5c1bc9ba2ff8940756466
> > Some things regarding UEFI are not clear to me:
> > - as you can see in the partition list, the installer created an EFI
> > partition on all 4 drives, however it looks like only the first one has
> > has been populated (an mounted): https://gist.github.com/silenius/1220c953f905d868c1615fd0e7122bbf .. why ?
> > - if I understand well if my da0 disk dies the system becomes
> >   unbootable (https://gist.github.com/silenius/51d202053295270eaaeb2c02316165ee).. correct?
> > - what's the correct way to fix this? should I newfs_msdos on each EFI
> >   partition and copy /boot/loader.efi as /EFI/BOOT/BOOTX64.EFI? or
> >   should I use efibootmgr?
> >
> > Thanks for enlightening me :)
>
> I use UEFI to multi-boot a lot myself, but not through efibootmgr (vs
> picking it via UEFI/BIOS on boot manually).  I'm multi-booting windows
> and FreeBSD, so I'm being (justifiably) paranoid, but not based on
> being burnt in recent memory.
>
> Depending on how your system works (drives are enumerated at startup),
> in theory any of your disks could be da0.  If you've only got a working
> EFI partition on one, that is probably hedging your bets a bit but yes,
> if that drive died, you'd probably be dead.
>
> In my dual-disk setups, I'd see an EFI and a freebsd-boot (BIOS) partition
> on both disks, I split my total swap between the two (not mirrored), and
> did ZFS "raiding" (mirroring-ish, usually) across the freebsd-zfs partitions.
>
> In my case, using the UEFI/BIOS from the motherboard, I could manually
> pick a disk to boot from which let me vet UEFI or ZFS bootblock changes
> for sanity before committing to both.  But yes, I'd upgrade them both to
> the same thing once I was sure it would work.

I just noticed the same problem.  For mirrored installs, the
13.1-RELEASE installer only formats the efi partition on one hard
disk.  Shouldn't it do both?