# Problem with booting FreeBSD



## P3p0x (Jan 1, 2015)

Hi people, I'm new on this system. I installed FreeBSD on my SATA disk very well. I have all configured,but I added an IDE disk with Windows 7 no a partition, other hard disk. I ran `boot0cfg -B ada0` and it shows two options:


```
F1 = ?
F5 = Win
F6 = PXE
```

Windows boots normally but FreeBSD does not.   How can I make it boot again?

When I ran `boot0cfg -B ada0`, only one disk was connected, the SATA disk that contains FreeBSD.

Sorry for my bad English!


----------



## wblock@ (Jan 1, 2015)

FreeBSD uses GPT partitioning by default.  boot0 only works with MBR.  Which did you choose when installing FreeBSD?

If it was the default GPT, it can be fixed by restoring the PMBR: `gpart bootcode -b /boot/pmbr -i 1 ada0`.

To multiboot, use your BIOS boot menu to choose a drive.


----------



## P3p0x (Jan 1, 2015)

Really I don't remember what I chose. I think that I used the default, because I have reinstalled a lot of times to learn other things! I try `gpart bootcode -b /boot/pmbr -i 1 ada0` and it tells me `gpart -i` is only valid with -p now?


----------



## wblock@ (Jan 1, 2015)

Use `gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0`.


----------



## P3p0x (Jan 1, 2015)

`gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0` and it tells me bootcode have written , but still:


```
F1 = ?
F5 = Drive 1
F6 = PXE
```
and when I press F1 only 

```
##
```
appears.


----------



## wblock@ (Jan 1, 2015)

If that menu is still appearing, the boot0 code has not been overwritten.  Boot from the FreeBSD install disk, go into Shell mode, and do it again.  After giving that command, type `shutdown -r now` and remove the install disk.


----------



## P3p0x (Jan 1, 2015)

Thanks works! Now how I can make for dual boot with FreeBSD and Windows 7? If I have FreeBSD in SATA disk, and Windows 7 in the IDE disk, only can use the BIOS?


----------



## wblock@ (Jan 1, 2015)

Use the BIOS boot menu, F12 on some machines.


----------

