rEFInd and _two_ FREEBSD systems on the same disk on the same UEFI laptop

salvatorembartolotta at libero.it salvatorembartolotta at libero.it
Thu May 28 18:02:57 UTC 2020


> Il 27 maggio 2020 alle 8.40 Masachika ISHIZUKA <ish at amail.plala.or.jp> ha scritto:
> 
> 
> > Has anyone installed two BSD (say -RELEASE and -STABLE) on the same disk on the same UEFI machine using rEFInd?
> 
>   I'm using rEFInd and /dev/ada0p9 is / for 12.1-release and
> /dev/ada0p10 is / for 13-current.
> 
>   I copied /boot/loader.efi (from current) to /EFI/freebsd/loader.efi.
> 
>   /EFI/refind/refind.conf is like the following.
> 
> menuentry FreeBSD-release {
> 	loader /EFI/freebsd/loader.efi
> 	options "rootdev=disk0p9 autoboot_delay=1"
> 	icon /EFI/refind/icons/os_freebsd-release.png
> }
> 
> menuentry FreeBSD-current {
>         loader /EFI/freebsd/loader.efi
> 	options "rootdev=disk0p10 autoboot_delay=1"
> 	icon /EFI/refind/icons/os_freebsd-current.png
> }
> -- 
> Masachika ISHIZUKA


Good afternoon,

Thanks for your swift and to-the-point reply.

Three remarks spring to my mind:

1) loader.efi is so smart as to manage, by _itself_, internal disks HDs/SSDs[1] (my laptop hosts a Samsung pm981 SDD),- no refind drivers for FreeBSD filesystems are needed;

2) loader.efi (about 500K in -CURRENT) is, so to speak, a full-fledged program, much smarter than loader(8); and I suppose loader.efi implements a _superset_ of the features of loader(8), documented in loader(8)'s man page;

3) There was a gotcha for my laptop. 
Setting the rootdev variable, apparently, made no difference and refind only booted the first system in the disk. I guess this has to do with the traditional (split) partition layout I had chosen for both of FreeBSD variants: 512K freebsd-boot[2] type partition, then \, swap, \var, \tmp, \home, and \usr.  I reinstalled both variants with almost the same scheme, i.e. with _NO_ freebsd-boot type partition.  The rootdev variable then just worked(TM).




[1] I have yet to find a Linux distro able to detect my SSD out of the box(TM) - i.e. without requiring changes in the UEFI settings.

[2] Such an example can be found in FreeBSD's handbook.


More information about the freebsd-questions mailing list