Date: Mon, 12 Sep 2005 22:12:49 -0700 From: "Gayn Winters" <gayn.winters@bristolsystems.com> To: <freebsd-questions@freebsd.org> Subject: Fixing a MBR (and more) that ??? trashed Message-ID: <006401c5b821$c960e810$c901a8c0@workdog>
next in thread | raw e-mail | index | archive | help
I recently installed Windows 2000 and FreeBSD 5.4 on an old HP Pavilion XG836. [The FreeBSD installation was a breeze (Kudos to the FBSD hardware team), while w2k was a disaster! But, that's another story...] For reasons of space and cabling (it is a very small box) I put the CD as the master and the HDD as the slave on a single IDE cable so that the HDD was ad1. I dual booted using the FreeBSD Boot Manager. Life was good until I wanted to add another disk. The w2k operating system, when booted, saw the new hardware, "installed" it, and demanded that I reboot. OK, but when I did, the FreeBSD boot manager was trashed. Its menu looked like: F1 ??? F2 FreeBSD F5 Default: F# I could not boot either operating system. In fact the only keys that did anything were ctrl-alt-del! I removed the new hardware and using Fixit on the 5.4 release CD, I tried boot0cfg -B ad1 This recovered the boot manager, and allowed me to boot w2k, but FBSD wouldn't boot. Pressing F2 in the boot menu still did nothing. Fdisk indicated that the two slices were ok, and the disklabel in sysinstall showed that the partitions in ad1s2 were fine, but the mounting information was apparently gone. If I went into Fixit, disklabel (bsdlabel) indicated that the label on ad1s2 was bad. I was a little surprised, since I assumed (perhaps incorrectly) that all the corruption that w2k caused was in the Master Boot Record. I tried fixing it with the disklabel in sysinstall without luck. Back in Fixit mode, I could execute bsdlabel -w ad1s2, I couldn't get bsdlabel -e ad1s2 to work since I couldn't get an editor to run. EDITOR was /mnt/stand/vi, which didn't work and blanking EDITOR didn't work either. Reinstalling FreeBSD brought everything back. Questions: 1. What did/do I need to do to completely fix the Master Boot Record? (Short of reinstalling FreeBSD!) 2. Was the disk label on the FreeBSD slice ad1s2 really corrupted? If so, I tend to doubt that w2k did it; hence, the culprit would be ... me! What did I do? 3. I couldn't get sysinstall to fix this mess - even though I thought it was fixing the FreeBSD partition mount points and applying a new BSD Boot Manager. I couldn't get these "fixes" to "commit". Can sysinstall fix this mess without reinstalling? 4. How do I avoid this situation when I add another disk? (Other than trash the w2k partition.) TIA, -gayn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006401c5b821$c960e810$c901a8c0>