be_informed_

#include <std$disclaimer.h>

Restoring the MBR with FreeBSD boot manager (after Windows eats it!)
evil_twin
[info]amunix
I dual-boot with Windows XP and FreeBSD. Now, I had to re-install XP - which meant that my master boot record (MBR) would be overwritten by Windows XP, and I would lose the ability to dual-boot. Does not matter, as we can always restore the MBR back to the one FreeBSD installed, with the following steps:
1. boot the machine through FreeBSD installation CD 1 (the boot CD)
2. through sysinstall (the FreeBSD installer), go to the Fixit mode
3. start the "live" image, which gives you all the commands
4. issue the following command at the shell prompt:
boot0cfg -B -s [slice_num] [disk]
In my case, the slice_num was 2 (as 1 was for Windows XP), and the disk was ad0.
(boot0cfg -B [disk] will suffice if you don't care for the "default boot selection")
5. exit the Fixit mode, and exit the installer. Remember to remove the boot CD.

You will be again greeted with the famous:
F1 DOS
F2 FreeBSD

Reading this will also help.

Enjoy!