Re: Current best practices: UEFI boot on zfsboot nvme raid?

From: Paul Mather <paul_at_gromit.dlib.vt.edu>
Date: Thu, 23 Mar 2023 19:23:44 UTC
On Mar 22, 2023, at 4:56 PM, Derek (freebsd lists) <482254ac@razorfever.net> wrote:


> Hiya,
> 
> Wondering what current best practices (13.1-RELEASE) are to make sure a zfsroot UEFI-boot system with a failed boot disk still boots, given the need to have a partition with an msdos filesystem to boot?
> 
> My first take is that I'll need to manually update each disks' efi code whenever /boot/loader.efi is updated, including after directly after a fresh installation?
> 
> Something that is irking me though, is that a device name is also hard-coded into /etc/fstab, so if the drive fails, a mounted filesystem also breaks.  I don't see how this can be a good thing, and will also interfere with a clean reboot, even if the boot code exists elsewhere.
> 
> My guess is, like swap, it might be possible to gmirror across my RAID this filesystem and remove all of these considerations.  Is this the best practice?


I don't know if it's best practices, but that is what I do.  I have a /dev/mirror/efi geom_mirror msdosfs mounted via /etc/fstab on /boot/efi.  That makes it easy to update both copies at once and keep them in sync.

However, the HUGE downside is that efibootmgr doesn't appear to work with GEOM labels, and so I get "efibootmgr: Cannot translate unix loader path" errors when trying to create new boot entries via "efibootmgr -c". :-(

I believe this Bugzilla is pertinent, and it still appears to be open: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229191

So, I guess best practices for everything working is to stick with the low-level device names like ada0p1 and so on.

Cheers,

Paul.