# FreeBSD dualboot with linux - how-to? none EFI



## dirkme (Aug 29, 2017)

Hi there,

I have 2 Linux OSes running on my Hdd and wonder how I can install FreeeBSD 11.1 on it without destroying my existing OSes.

Like in Linux I create 1 partition and flag it as / (root) and all is good.

Also, does Grub recognize FreeBSD and where would I write the boot sector to not override my existing Grub boot menu?

Sorry guys first attempt to get my feet wet with FreeBSD


----------



## HL1234 (Aug 29, 2017)

Hello,
fine you try FreeBSD 

FreeBSD have a very good large documentation. It is called Handbook. It is more then just a beginner guide as I have seen by other system.

For Your answer I would recommend to read first that:

*12.2. FreeBSD Boot Process*
https://www.freebsd.org/doc/handbook/boot-introduction.html

Harald


----------



## islamux (Aug 29, 2017)

Booting FreeBSD via GRUB
*Multi-boot freeBSD with Windows, Debian and Linux Mint*


----------



## balanga (Sep 2, 2017)

I tried the suggested additions to /etc/grub/.d/40_custom on Arch Linux using the provided entry, ie.:


```
menuentry 'FreeBSD' --class freebsd --class bsd --class os {
       insmod part_msdos
        insmod ufs2
        set root="(hd0,msdos1,bsd1)"
        kfreebsd /boot/loader
}
```

but after selecting this entry I get:

```
Booting a command list

error: no such partition

Press any key to continue...
```

FreeBSD was installed first on this disk and did boot before I added Arch linux.

I would have installed Grub under FreeBSD but couldn't work out what menuentry I needed for Arch Linux...


----------



## markb (Sep 7, 2017)

Good afternoon,
Have you tried (from Arch) running gparted and seen which partitions are listed?  Look for a EFI partition ~200MB that was created by FreeBSD. My 7th partition is the EFI partition, and 8th is FreeBSD UFS and here's my 40_custom contents.
Hope this helps,
Mark

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#GPARTED shows I installed on SECOND drive (hd1), not FIRST drive (hd0).

menuentry "FreeBSD ufs hd1" {
insmod ufs
set root=(hd1,gpt7)
chainloader (${root})/efi/boot/BOOTx64.efi
boot
}


----------

