Solved. Re: Dualboot and ZFS

Victor Sudakov vas at
Sun Mar 25 04:43:00 UTC 2018

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.

IMHO boot1.efi could at least honor the "bootme" flag if there are
several freebsd GPT partitions, the way gptboot does.

Victor Sudakov,  VAS4-RIPE, VAS47-RIPN

More information about the freebsd-questions mailing list