From owner-freebsd-questions@FreeBSD.ORG Sat Nov 27 14:00:27 2004 Return-Path: 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 B936716A4CE for ; Sat, 27 Nov 2004 14:00:27 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EE1743D55 for ; Sat, 27 Nov 2004 14:00:27 +0000 (GMT) (envelope-from henrik.w.lund@broadpark.no) Received: from [10.0.0.3] (52.80-202-129.nextgentel.com [80.202.129.52]) by mail.broadpark.no (Postfix) with ESMTP id 8CA38148B for ; Sat, 27 Nov 2004 15:00:25 +0100 (MET) Message-ID: <41A88879.1070909@broadpark.no> Date: Sat, 27 Nov 2004 15:00:25 +0100 From: Henrik W Lund User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.3) Gecko/20041111 X-Accept-Language: no, en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Fun with partition tables... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 14:00:27 -0000 Greetings, list! I'm asking this question with the (very faint) hope that someone knows of any way to help me recover my drive. Allow me to explain: I'm dual booting Windows XP and FreeBSD/amd64 on two different physical drives. I installed boot0 to the disk that had Windows XP on it (all on a single partition, mind you) and it was running fine, dual booting was a breeze. However, when I installed a third drive, things went funny, and the BIOS no longer reported the FreeBSD drive (it's on a RAID controller), so that boot0 no longer saw it. Fine, not much that can be done about that. Upon fiddling with BIOS settings, I discovered a built-in BIOS boot device selector, and decided to remove the boot0 from my Windows drive (since it didn't do anything useful anyway). This is where I messed up. Under /dev, I have ad2 (the windows drive), and ad2s1 (the partition that has Windows on it - this is the only partition on the drive). The command fdisk -B /drive/ will install a default boot manager, so I did an fdisk -B /dev/ad2 as root, only to get an "Operation not permitted" error. Thinking this funny, I did a fdisk -B /dev/ad2s1 which worked. Alas, this was my undoing. A reboot yielded boot0 still popping up, but when trying to boot Windows, I got the dreaded "Invalid partition table" message. The horror! Back into FreeBSD, I reran the fdisk -B /dev/ad2 which now worked for some reason, and a reboot showed that boot0 was in fact gone, but the partition table was still invalid. A number of silly mistakes made by me in the following frustrating hours included running fdisk -I /dev/ad2 (forgot the -t flag) because I had half given up on ever seeing my data again. In hindsight, I see that my best bet would have been to boot the recovery console off of the WinXP CD and ran fixboot and fixmbr, but it's a bit late for that now. I did eventually run fixboot, and it placed a FAT16 partition table entry on the disk (I originally had NTFS on it). Now, my question is this: is there any hope of me ever seeing my data again? Seeing as how the entire disk was originally covered in a single NTFS partition, is it possible to add an entry for such and access the files once again? This is a long shot, I know, but you never know... Thanks for any and all help! -- Henrik W Lund