# How do I  remove FreeBSD Boot Menu



## PetrusValidus (Feb 17, 2009)

Hi All,

I have a FreeBSD system which has been repurposed with Debian.  However the boot menu from FreeBSD is still on the disk and it prevents Debian from booting.

When I start the system I have this menu like:

F1 ??
F2 ??
F3 ??
F5 Linux

So I press F5 and it brings me to grub, but after selecting the kernel grub returns with error 17.  How do I remove this FreeBSD boot menu thing?

Any help will be appreciated.

Thanks.


----------



## hedwards (Feb 17, 2009)

That gets written to the MBR, the way to get rid of it is to overwrite the MBR with a new one that redirects to the grub partition.

F5 generally switches to a secondary hard disk. So if you don't have a valid Linux install on that disk, it's going to fail.

There's probably a few ways of handling that, one is you boot from a grub CD and re-setup grub from there with the appropriate information, and the other is that you boot back up with a FreeBSD boot disk and use fdisk to install a standard MBR. I think it's the second option.

But, before doing that I'd probably verify that the other F1 - F4 are not working. It might be some funkiness with Linux using more than 4 partitions on the same disk.


----------



## PetrusValidus (Feb 17, 2009)

OK, thanks.  Since this is not a production machine I'd like to just wipe the disks clean and just start from scratch, however that hasn't seemed to work.

The machine I'm using has three hard drives in it and during the Debian install I erased all the partitions and deleted them, but for some reason it didn't touch the MBR.  Odd.

But I will try your suggestion, thank you.


----------



## Brandybuck (Feb 17, 2009)

The Debian installer should give you some way to write Grub (or lilo) to the MBR, but it won't be the default. You should be able to run grub manually to install to the MBR.


----------



## zeiz (Feb 18, 2009)

I have a machine with 2 HDD where I try many linux and bsd distors. I have GAG 4.10 boot manager on floppy (just in case) and MBR that works just fine to boot up to 9 OS's. I can install and reinstall OS's (including Windows) on the fly. The only condition: you must never choose particular bootloader (grub, lilo, FreeBSD bootloader) on MBR but rather on it's own /boot partition. For FreeBSD sysinstall it means that you must choose "None" when asking where to install bootloader (3-rd choice). This would also allow to install Debian's grub on MBR and then edit its menu.lst with adding 

```
title       FreeBSD-7.1
root        (hd0,1,a) #change 0 and 1 with what you have; "a" is essential)
kernel       /boot/loader
```
To clean MBR I use ZAP utility that erases first 128 sectors on HDD.


----------

