# Multi-boot



## GP13 (Oct 3, 2019)

Hello to everybody on this forum
I am a newbee in FreeBSD, I am using actively OpenSUSE and Windows every day, I have tried back in time PC-BSD. I would like to learn more about FreeBSD, but I would like a multi-boot on existing machine with OpenSUSE and Windows. Do you have some pointers for me, is it enough to install FreeBSD on unpartitioned space on existing HDD and than through OpenSUSE add to Grub2? What are your experiences with multi-boot?

Thx!


----------



## tingo (Oct 3, 2019)

On UEFI machines, I tend to use rEFInd if I want multiboot and want to run FreeBSD as one operating system. Why? because it is so much easier to set up, than to mess around with grub in order to get FreeBSD booting. This might just me being old and set in my ways...


----------



## pierre (Oct 4, 2019)

Here is what I did for a multi-boot (openbsd, freebsd, debian). 
I hope it will help you
1) I installed Openbsd on the first slice
2) I installed FreeBSD on the second slice.
At this point I could only boot on FreeBSD. As my goal was to use the FreeBSD bootloader in order to boot each operating system, so I launched this command
`gpart bootcode -b /boot/boot0 ada0`
The result is this boot screen: F1 Openbsd, F2 FreebSD
For a good understanding of the command above, it's fairly essential to read gpart() , especially the `gpart bootcode` command and section BOOTSTRAPPING.

3)I installed Debian on the two last slices, the third one as a separate /boot partition and the fourth one as an extended partition. Then to complete the installation, I installed grub2 on the the boot partition  (not on the head of the disk)
Of course, I could have create only one  partition or use the /root partition as the boot one.

Final result , this simple boot screen: F1 Openbsd, F2 FreebSD, F3 Linux.


----------



## D-FENS (Oct 4, 2019)

GP13 said:


> Hello to everybody on this forum
> I am a newbee in FreeBSD, I am using actively OpenSUSE and Windows every day, I have tried back in time PC-BSD. I would like to learn more about FreeBSD, but I would like a multi-boot on existing machine with OpenSUSE and Windows. Do you have some pointers for me, is it enough to install FreeBSD on unpartitioned space on existing HDD and than through OpenSUSE add to Grub2? What are your experiences with multi-boot?
> 
> Thx!


If you just want to learn more about FreeBSD, it would probably be much easier to install it in a virtual machine. Use any virtualization software for windows or Linux - for example QEMU, VirtualBox or VMWare. Install FreeBSD and learn it in the VM. This will save you a lot of trouble trying to configure a triple boot system.


----------



## userxbw (Oct 5, 2019)

whence you get your FreeBSD installed figured out,  using Linux and 40_custom make a menu for freebsd update grub, boom you're in like peanut butter.
/etc/grub.d/40_custom

```
menuentry "FreeBSD 12-p10" {
set root='(hd0,3)'
#chainloader +1
kfreebsd /boot/loader
}
```
You'll need to figure out your actual partition nomenclature.

FreeBSD HAS to be on a primary partition for msdos legacy boot, or gpt partition table for efi boot


----------

