Clear MBR
From FBSD_tips
Back to "Admin building blocks"
Sometimes you might end up with a corrupt MBR on your booting disk.
This may happen if you incorrectly install a new bootloader. Or any other reason.
Then it is useful to clear the MBR before rewriting it again.
We'll use /dev/ad0 as an example.
You should ofcourse use the disc that is relevant for your setup.
You might have to set kern.geom.debugflags=16. Make sure you know what this means!
If you want to clear the whole MBR:
dd if=/dev/zero of=/dev/ad0 bs=512 count=1
If you want the partition table to remain untouched:
dd if=/dev/zero of=/dev/ad0 bs=446 count=1
