# Multi-boot freeBSD with Windows, Debian and Linux Mint



## fracmo2000 (Sep 5, 2016)

My laptop currently has Windows 10, Debian and Linux Mint.

I would like to install FreeBSD as another operating system and wondered if FreeBSD installed just like the other Linux distros and created an entry for itself in grub menu along with the other distros. Or is there more to it than that.  Normally I would use the existing swap and create a single partition for /.

I have never used FreeBSD before and am looking for guidance or any tutorials that will help me.

Thanks.


----------



## SirDice (Sep 5, 2016)

Note that FreeBSD is not a "distro". FreeBSD doesn't use Grub so it will not 'automatically' add itself. You'll have to do that part yourself.


----------



## fracmo2000 (Sep 15, 2016)

SirDice said:


> Note that FreeBSD is not a "distro". FreeBSD doesn't use Grub so it will not 'automatically' add itself. You'll have to do that part yourself.


Thanks for feedback.  I checked on google and read a few articles.

Can you confirm if my understanding of FreeBSD is correct?

1. Although FreeBSD needs a primary or GPT partition, it will attempt to identify other installed operating systems and then to add to it's customized version of the GRUB boot-loader automatically.   

2. It also requires that its version of GRUB be installed as the primary boot-loader on the disk.  

3. So looks like FreeBSD needs to be in charge of the grub menu?


----------



## SirDice (Sep 15, 2016)

No, not really. Again, FreeBSD doesn't use GRUB. You can install it as a port but nothing from the base OS requires or uses it, this includes the installer. FreeBSD does have a boot manager, boot0cfg(8), it does indeed automatically detect other operating systems. It's been a while but as far as I know it's not able to boot a ZFS FreeBSD system. If Linux, with GRUB, is already installed, use that to 'control' the GRUB menu. I don't dual boot myself but there are quite a few here that do and will be able to help out with that part.

If you've never used FreeBSD before I can recommend having a few practice runs on a virtual machine. Then you'll know what to expect when you're having a go on your own system, and blows up half-way through


----------



## angus71 (Sep 22, 2016)

Hi!
I am not quite sure but I would think it's not a big problem.
It GRUB is already installed in your MBR you should just run
"sudo update-grub" in your debian terminal. GRUB will detect the 
other OS on your computer and will write a new configuration file.
That will work with a UFS file system, for ZFS I am - like SirDice -
not so sure.....  Good  luck!


----------



## Maxnix (Sep 22, 2016)

In your Linux system you should have the /etc/grub.d/40_custom file. Put an entry for FreeBSD there, then update your GRUB configuration.
Here there is an example:

```
menuentry 'FreeBSD' --class freebsd --class bsd --class os {
        insmod part_msdos
        insmod ufs2
        set root="(hd0,msdos< your slice number >,bsd< your root partition number, i.e. ada0s1a = hd0,msdos1,bsd1 >)"
        kfreebsd /boot/loader
}
```


----------



## Yampress (Sep 22, 2016)

You can install grub2 under Freebsd  from ports
https://forums.freebsd.org/threads/28443/

And you can boot another system  from it.


It's not working with zfs


----------



## rufwoof (Aug 8, 2017)

I use grub4dos bootloader and have freeBSD installed in two different partitions, a main one in sda3 (gui), a cli only version in sda4, alongside full debian in sda1 (within which I also have a read only boot via frugal filesystem.squashfs type boot). Amongst others (Puppy Linux etc.). Extract of menu.lst :

```
title BSD sda3
root (hd0,2)
makeactive
chainloader +1
boot

title BSD Admin (cli) sda4
        root (hd0,3)
        makeactive
        chainloader +1

title Debian FULL
  find --set-root /live/jessieamd64lxde
  configfile /boot/grub/menu.lst
  commandline

title Debian FILESYSTEM 
find --set-root /live/filesystem.squashfs
kernel /vmlinuz boot=live quiet splash
initrd /initrd.img
```


----------



## sko (Aug 9, 2017)

By far the easiest way for multi-booting nowadays is an EFI loader like rEFInd.

Beware of weird/broken EFI-boot implementations on some operating systems. Especially Windows is particulary annoying because it absolutely wants and needs its special partitions to be the first on the disk. Also the disk ordering still seems to be a problem for Windows - haven't touched any Windows more than absolutely necessary within the last ~15years apart from the remaining Win7 Clients at work, so can't really give much information about this.

All other OS are usually fine - I'm booting TrueOS, FreeBSD 11 and an old devuan installation via rEFInd on my laptop. This is far superior to anything based on GRUB that still can't properly boot from ZFS and breaks every second full moon or if the temperature isn't right while updating


----------

