View Single Post
  #2   (View Single Post)  
Old 17th July 2009
s0xxx's Avatar
s0xxx s0xxx is offline
Package Pilot
 
Join Date: May 2008
Posts: 192
Default

Well I will not tell you that you nuked your Windows partition as I don't know what you did, but it seams as a serious error. Anyway, follow this to get the Windows loader back, and also use it to boot FreeBSD with it:

First you save the MBR in case something goes wrong so you could restore it and at least boot the FreeBSD. I also suggest you get the fdisk and bsdlabel output to a file on a usb disk so you have other needed information in case of failure.
Code:
dd if=/dev/ad0 of=/mnt/usb_disk/mbr.backup bs=512 count=1
Then you need first sector of your FreeBSD root partition. You will put this on Windows C partition so NT loader so can pass instructions to it. It is actually /boot/boot1 (stage one) so you could copy it from either FreeBSD root partition (unless FreeBSD is on another disk), install CD, or just grab it with dd:
Code:
dd if=/dev/ad0s2a of=/mnt/usb_disk/bootsect.bsd bs=512 count=1
This is assuming your FreeBSD is installed on second slice of the first disk. Then, you boot the Windows installation disk and go to recovery console and just type:
Code:
C:WINDOWS> FIXMBR C:
This will restore the NTLoader back. Try to see if you can boot into Windows now. If it doesn't boot, go boot the CD again and try the FIXBOOT command.
If it boots, open boot.ini file located in C: and put the following bellow the line mentioning Windows (you do not delete anything, just add another entry at the end of file):
Code:
C:bootsect.bsd="FreeBSD 7.0"
That should present you with an option to boot FreeBSD after reboot. If you ever deceide to remove FreeBSD you just delete the file and remove the entry in boot.ini.
__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD
Reply With Quote