Solved. Re: Dualboot and ZFS

Trond Endrestøl Trond.Endrestol at
Fri Mar 23 11:13:23 UTC 2018

On Fri, 23 Mar 2018 11:33+0100, Trond Endrestøl wrote:

> > 1. If I have more than one freebsd-ufs partition, how can I configure
> > boot1.efi (AKA /EFI/BOOT/BOOTX64.EFI) to boot the loader from a
> > particular partition, not from the first one?
> I doubt you can without modifying the source code. Such has never been 
> an issue at my end. Maybe someone else will chime in.

This is from uefi(8) on fairly recent stable/11:

           2.   boot1.efi reads boot configuration from /boot.config or
                /boot/config.  Unlike other first-stage boot loaders,
                boot1.efi passes the configuration to the next stage boot
                loader and does not itself act on the contents of the file.
           3.   boot1.efi searches partitions of type freebsd-ufs and
                freebsd-zfs for loader.efi.  The search begins with partitions
                on the device from which boot1.efi was loaded, and continues
                with other available partitions.  If both freebsd-ufs and
                freebsd-zfs partitions exist on the same device the
                freebsd-zfs partition is preferred.  boot1.efi then loads and
                executes loader.efi.

Apparently, there are some options. Using /boot.config or /boot/config 
on the ESP. Using /boot/loader.conf whereever /boot/loader.efi 
resides. Relocating loader.efi to wanted the UFS partition. Note the 
preference towards ZFS when both are present. I don't have any 
experience using either option.


More information about the freebsd-questions mailing list