# Installing FreeBSD 9 & Fedora 17 Dual Boot on GPT disk with Grub 2



## amr (Jul 22, 2012)

Hello Everyone,

I've installed both FreeBSD 9 & Fedora 17 together on GPT disk using grub2, actually after googling I couldn't find more information about this so I am sharing this with you all, I hope you will find it useful.

First install FreeBSD 9 (it doesn't matter which one is first but I prefer bsdinstall(8) because it is really advanced with disks, etc).

Partition layout. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-partitioning.html

You can make a traditional layout, but for me:

1. 256K freebsd-boot.
2. 112G freebsd-ufs.
3. 4G freebsd-swap.

After you install FreeBSD, install sysutils/grub2 by 


```
# cd sysutils/grub2
# make install clean
```
or
`# portmaster sysutils/grub2`

`# rehash`
then

`# grub-install --modules=part_gpt /dev/ada0`

then 

`# ee /usr/local/etc/grub.d/40_custom`

then add


```
menuentry "Fedora 17, with x86_64 kernel" --class gnu-linux --class gnu --class os {
         insmod part_gpt
         insmod ext4
         set root='(hd0,5)'
         linux    /boot/vmlinuz-XXXXXXX
}
```

Change XXXXXXX to your kernel version.

then

`# grub-mkconfig -o /boot/grub/grub.cfg`

And now install Fedora 17 but without boot loader, partition layout the same as FreeBSD.

1. 1M (boot bios)
2. 112G (ext4)
3. 4G (swap)

Don't forget: don't install the boot loader.

Now you are done, but there is one issue which I faced.  In FreeBSD, I can't load modules & kernels using /boot/loader.conf.  If you have the solution, please let me know.

Enjoy!!
AMr


----------

