Solved Dual boot FreeBSD/Linux

Hi guys,

I read a lot of topics today but none that was closer to my situation.

I am planning to install FreeBSD very soon, but I am scary to have some important pieces missing, hence I would like to preserve a Linux for any emergency.

I have three SSD same size, I am going to assign 2 to FreeBSD and one to Linux (Devuan), there will both fresh installation, so the point is this:

  • which OS should I install as first?

So far I guess I should Install FreeBSD (on 2nd and 3rd disk) and later Devuan.

  • Should the EFI/BOOT partitions already available while installing FreeBSD?
  • Does it matter if FreeBSD is on 2nd & 3rd disk while EFI/BOOT is on the 1st disk?
  • Did I get the whole thing wrong? 😁

Thanks in advance,

TGL
 
I would recommend installing them to their own ssd whitout mixing efi, and then using grub to chainload freebsd like this:

Code:
menuentry "FreeBSD" {
      insmod ufs2
      root=(hd0,gpt2)
      chainloader /boot/loader.efi
}

This is the way I've done it on my laptop with one ssd and UFS, it may be different in your case.

On my desktop I have a similar setup to yours, two ssds with ZFS and FreeBSD and one ssd for Arch linux, in that case I simply use the motherboard boot menu to chose what to boot, as they both have an uefi entry.
 
For a Linux / FreeBSD dual boot I would suggest the following:

Install Devuan first. Once it is up and running install a different boot loader than Grub.

apt install refind. It will take over as the main boot loader.

Now reboot and install FreeBSD on the second disk. When done reboot and at system start time refind will ask you
which one to boot, Devuan or Freebsd.

If you install a third OS put it on Disk 3. Maybe another Linux or a Solaris. Whatever refind will let you choose.

This solution is much easier than mucking around with Grub or the BSD boot loader.

More info here: https://www.rodsbooks.com/refind/

Very easy and no fiddling around with other boot loaders.
 
meaw229a

Thanks for the advice, never used refind, I'll do some test with a virtual machine although I've always had issue with VirtualBox and EFI bios.
 
For a Linux / FreeBSD dual boot I would suggest the following:

Install Devuan first. Once it is up and running install a different boot loader than Grub.

apt install refind. It will take over as the main boot loader.

Now reboot and install FreeBSD on the second disk. When done reboot and at system start time refind will ask you
which one to boot, Devuan or Freebsd.

If you install a third OS put it on Disk 3. Maybe another Linux or a Solaris. Whatever refind will let you choose.

This solution is much easier than mucking around with Grub or the BSD boot loader.

More info here: https://www.rodsbooks.com/refind/

Very easy and no fiddling around with other boot loaders.
IMO, refind is the easier solution for dualboot (nearly 0 configurations to be done), not to mention is clean, autodetect things without having to fiddle (again) with configurations like grub. It can boot anything with an .efi, even another bootloader.
 
tgl : I have Devuan Daedalus, Ubuntu Linux distros along with FreeBSD in my 1SSD+1HDD Desktop system. IMO, there is no priority when installing Linux/BSDs unlike when you have Windows OS in the multi-booting list. In my PC, the EFI partition is in SSD and FreeBSD-root & FreeBSD /home partitions in Hard drive. I am using rEFInd for long and it is far more easier compared to Grub. BTW, you need to have the /boot/loader.efi copied to the EFI/ESP system partition to get FreeBSD booting.
 
Abraham79

I don't make a dual boot installation since at least 10 years. I have some confidence with Grub and I am pretty sure it would be able to recognize FreeBSD what I don't know if FreeBSD would care about Grub commands, hence I'd like to do the easiest thing for me.

Anyway, my second goal would be (if feasible) also running Devuan through Behive using the real partition, I remember once I did this with Virtualbox, but it was at very beginning of my journey with (Debian)Linux and my memories have already faded out.

Have you ever tried a similar approach?

Best regards and thanks to all of you!
 
Using AutoZFS option has totally ignored the existence of the Linux Partion... Let's see if I can fix this otherwise I am going to install freebsd first and linux later. 🤔

EDIT:

I can't even boot from CD,

Code:
Consoles: EFI console
GELI Passphrase for disk1p3:

Is preventing the system from booting from the CD even if I disabled boot from disk from the settings... 🤷‍♂️

SOLVED:

It looks like the FreeBSD installer is smarter than the one provided by Debian/Devuan, it installed by itself the EFI entry in the EFI partion.
After realized the entry was in the right place I remembered about "efibootmgr" at this point I simply reordered the list putting refind before FreeBSD, and refind works like a charm!

I am pretty happy, installing FreeBSD is now much much closer, now I have to test hardware compatibility, I wonder if is NomadBSD is a good choice for testing hardware?

Bye and thanks again for all the support! 🍺
 
I would recommend installing them to their own ssd whitout mixing efi, and then using grub to chainload freebsd like this:

Code:
menuentry "FreeBSD" {
      insmod ufs2
      root=(hd0,gpt2)
      chainloader /boot/loader.efi
}

This is the way I've done it on my laptop with one ssd and UFS, it may be different in your case.

On my desktop I have a similar setup to yours, two ssds with ZFS and FreeBSD and one ssd for Arch linux, in that case I simply use the motherboard boot menu to chose what to boot, as they both have an uefi entry.

I found Refind pretty straightforward and good as well, it runs Grub if you select Linux and it runs FreeBSD if you select the latter. You don't need to go into the linux realm if you want run FreeBSD, call it a "shortcut".
 
Small Update
I tried to use GRUB to run FreeBSD just to understand however I failed.

Even installing ZFS "os-prober" doesn't recognize FreeBSD, which is annoying because in the past Linux has never been so hostile toward other OSes like today.

The Debian Wiki doesn't explain a bit and its example is by the way wrong:


Other examples from the forum didn't help too:


I have just tried all the combination available, maybe it depends because ZFS, but none of them worked (probably I missed the only good one), hence I reiterate the refind method is easiest one.

It is because this constant increasing amount of small annoying details that I am tired of Linux...
 
Alain De Vos

This requires a little bit of study by my hand but I am not very tempted since the refind method is just as easy as to install a package and anything else...
 
Back
Top