From owner-freebsd-questions@FreeBSD.ORG Tue Sep 13 05:12:55 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 847FD16A41F for ; Tue, 13 Sep 2005 05:12:55 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from bristolsystems.com (h-68-167-239-98.lsanca54.covad.net [68.167.239.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3544343D48 for ; Tue, 13 Sep 2005 05:12:55 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from workdog ([192.168.1.201]) by bristolsystems.com (8.11.6/8.11.6) with ESMTP id j8D5Csn04296 for ; Mon, 12 Sep 2005 22:12:54 -0700 From: "Gayn Winters" To: Date: Mon, 12 Sep 2005 22:12:49 -0700 Message-ID: <006401c5b821$c960e810$c901a8c0@workdog> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal Subject: Fixing a MBR (and more) that ??? trashed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gayn.winters@bristolsystems.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2005 05:12:55 -0000 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