# Dual-boot FreeBSD with GPT



## mgp (Aug 20, 2011)

Hi,
I have two hard disks, one with FreeBSD (with legacy bsd labels) and one with windows7. I'd like to switch to GPT partitions but apparently the FreeBSD boot manager can't be used with GPT. Is there a mechanism that allows dual-booting FreeBSD with GPT? Is GRUB capable of doing that? If yes, how is the trick done?
Also is the FreeBSD boot manager going to be taught to work with GPT?

10x


----------



## Beeblebrox (Aug 22, 2011)

> FreeBSD boot manager can't be used with GPT


What? Since when? Works fine with GPT disk.  Don't know how well FreeBSD booter works with windows however... Maybe you mean that the boot manager can't boot windows on GPT partition? Yes there is such a problem apparently, but it is a windows problem as it does not recognize GPT disks unless win7 (?) and XP, vista etc demand MBR disks - so not a boot loader problem.

GRUB: great software in my Opinion - Use grub2 (> 1.97).
To boot FreeBSD you can use "chainloader +1" or direct,
For windows again "chainloader +1", or "wubi" from windows environment

In GPT you need first partition as 64K bios-grub "dummy MBR" which keeps a boot record.  I advise also an ext2 or fat16/32 grub partition (256K-512K). WUBI sets this up on its own probably but DK for sure.


----------



## jem (Aug 22, 2011)

If you have Windows and FreeBSD on seperate disks, probably the easiest way to dual-boot is with the BIOS boot menu.

FreeBSD does support GPT, as does Windows 7 64-bit (if the BIOS has UEFI boot support), but I've not seen any information on how to dual-boot between them.

Thinking about it, you might be able to copy FreeBSD's gptboot file across to your Windows partition and use EasyBCD to point the bootloader at it.


----------



## graudeejs (Aug 22, 2011)

I don't think Windows can boot from GTP if you don't have EFI (but I'm not sure)


----------



## mgp (Aug 23, 2011)

Guys I'm not sure we are talking about the same thing. I'm talking about the FreeBSD boot manager AKA the boot0 boot manager AKA that thing that lets you choose what to boot by pressing one of the F keys e.g.

```
F1 FreeBSD
F2 FreeBSD
F3 Win
F5 Drive 1
```
So if you have a GPT disk and you try this:

```
# boot0cfg -v ad0
```
You get something like "incompatible table".
If you try to install the boot manager anyways like this:

```
# boot0cfg -B ad0
```
And restart you get:

```
F1 ?
```
And when you press F1 nothing happens. I have already tried the above. Hence my statement:


> FreeBSD boot manager can't be used with GPT


So has any one successfully dual-booted FreeBSD GPT + another OS on the same or different disks and how.
My BIOS doesn't have boot menu, I can only setup a boot sequence from the BIOS menu.
I don't know whether my BIOS supports EFI and I don't know how to check that, do you?


----------



## jem (Aug 23, 2011)

The boot0 boot manager certainly only works with MBR slices.  At only 512 bytes in size, it isn't big enough to contain all the code necessary to deal with GPT too.


----------



## aragon (Aug 24, 2011)

Booting GPT disks is radically different to MBR, and boot0's architecture will never work even if there were space for more code.  FreeBSD's GPT boot loader is not advanced enough yet to be a boot manager either, and may never be - that's what EFI is for, I think.

Perhaps you can try GRUB2 though.


----------

