From owner-freebsd-questions@FreeBSD.ORG Sun Mar 5 18:46:39 2006 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 24A7B16A420 for ; Sun, 5 Mar 2006 18:46:39 +0000 (GMT) (envelope-from gerard@seibercom.net) Received: from smtp1.suscom.net (smtp1.suscom.net [64.78.119.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5BF643D5F for ; Sun, 5 Mar 2006 18:46:31 +0000 (GMT) (envelope-from gerard@seibercom.net) Received: from localhost (smtp1 [127.0.0.1]) by smtp1.suscom.net (Postfix) with ESMTP id 0A3061D0003 for ; Sun, 5 Mar 2006 13:49:14 -0500 (EST) Received: from smtp1.suscom.net ([127.0.0.1]) by localhost (smtp1 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26816-02 for ; Sun, 5 Mar 2006 13:49:13 -0500 (EST) Received: from seibercom.net (ip148.217.45.216.suscom.net [216.45.217.148]) by smtp1.suscom.net (Postfix) with SMTP id 3A8381D0002 for ; Sun, 5 Mar 2006 13:49:13 -0500 (EST) Received: from [192.168.0.4] (boss [192.168.0.4]) by seibercom.net (8.13.4/8.13.4) with ESMTP id k25IkTos016212 for ; Sun, 5 Mar 2006 13:46:29 -0500 (EST) (envelope-from gerard@seibercom.net) Date: Sun, 05 Mar 2006 13:46:30 -0500 From: Gerard Seibert To: freebsd-questions@freebsd.org Sender: gerard@seibercom.net Organization: Seibercom In-Reply-To: <000001c64058$9d5179a0$040ba8c0@HAPLO> References: <20060304204805.8460116A460@hub.freebsd.org> <000001c64058$9d5179a0$040ba8c0@HAPLO> X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(gxJxxcR nSNPNr*/^~StawWU9KDJ-CT0k$f#@t2^K&BS_f|?ZV/.7Q Message-Id: <20060305134300.75D1.GERARD@seibercom.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Mailer: Becky! ver. 2.24.01 [en] X-Virus-Scanned: ClamAV 0.88/1315/Sun Mar 5 05:31:57 2006 on seibercom.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at suscom.net Subject: Re: Help with lost MBR on USB HDD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2006 18:46:39 -0000 Jarrod O'Flaherty wrote: > Hi All, > > I have a dual boot system going with WinXP and FreeBSD on my laptop. > Just before I installed FreeBSD I bought a USB HDD to plug in so I could > transfer some files off my laptop's internal HDD and make space for it. > > Alas, even with doing that I could only get a measly 7 GB free, which I > used up pretty quickly building the JRE for OpenOffice. When I got my > USB HDD I split it into 4 x 60GB slices (partitions), changing one of > them from the default NTFS to FAT32, so I could share it with FreeBSD. > > While the sharing was ok, unfortunately FAT32 doesn't support symlinks > and this led to errors when I tried to use that slice for building stuff > in ports. > > I decided I needed a native UFS2 slice instead of a FAT32 one and set to > work. > > Firstly, I have "Acronis PartitionExpert Personal" and according to > that, all the slices apparently existed (past tense!) in a single > logical partition. I used the program to change my *THIRD* slice > (between 120GB and 180GB) from existing in the logical partition to > being a physical partition in its own right. Was this a bad move, not > being at the end of the disk? Acronis never complained and it all seemed > to work ok. > > I then proceeded to try to change its type from 7 (NTFS) to 165 > (FreeBSD). Acronis said it needed to reboot to do this, you know that > odd, special WinXP (safe?) mode? When it did so though it said my drive > was not present. Was this because the USB drivers aren't loaded in that > odd WinXP pseudo-DOS "blocky character" mode? Or was this because I had > my USB drive on auto power-off and it took too long to windup? > > Anyway, whichever it may be, PartitionExpert said that it couldn't find > the drive so it couldn't change the type. > > I then thought well surely if I can't do it under XP then I can do this > under FreeBSD. I looked at the MBR under fdisk and it had 2 entries, one > for the logical partition and one for the new physical partition I had > setup with PartExp. > > I must admit I was more comfortable with the fdisk in sysinstall, since > I had used that when installing FreeBSD, so I changed to that one. The > display seemed a little odd because it had about 8 entries, my four 60 > GB slices, plus four other very small slices between each 60GB slice. A > couple were "63" in size, but the one just above the partition I wanted > to change (da0s2) was "7" in size. I wrote down the lines around the > partition I wanted to change, but didn't write the whole table out as it > was rather long winded. Aerrr, bummer! > > Anyway, I changed the Type from 7 to 165. And that's ALL I did. I then > Wrote the table out and exited. I went into the labelling tool (also in > sysinstall) and set the slice as one big FreeBSD partition. The > labelling tool automatically newfs'ed it for me, and things were good to > go. > > Next I exited sysinstall and mounted my partition under FreeBSD. > Everything was great. > > Past tense. > > When I next booted into WinXP a few minutes later, all my NTFS drives > were gone. A quick look under Acronis told me only my FreeBSD slice > remained. > > Ummm, so what had gone wrong? Any ideas? > > I went back into FreeBSD and had a look at the MBR under fdisk (the > command line version this time) and now there was no entry 1, just an > entry 2, pointing to the FreeBSD slice. So I had lost my 3 other slices, > from 0 - 60 GB (NTFS), 60 - 120 GB (NTFS), and 180 GB - end_of_disk > (FAT32). > > Can anyone please tell me what happened when I ran sysinstall's fdisk? > Can anyone also perhaps tell me where the slice (partition) info is kept > for a logical partition? Since the MBR only had 1 entry for the other 3 > partitions their info is obviously not stored there. Where and how is it > stored? > > And last but not least, I really hope someone can tell me how I can > salvage my MBR & other 3 partitions. If that is not possible, then > perhaps you can point me in the direction of a tool which will salvage > the files on the lost slices? There's not heaps of data there, only > around 20 GB or so across all three. But if I can, I'd really like to > get it back. I'm hoping NTFS is robust enough to allow salvaging like > this? > > Any and all help GREATLY appreciated!! > > Thankyou, > Jarrod. I know you do not want to hear this, but why on earth did you attempt to mess with the HD without a full backup in place first? I am not sure if you can recover the lost data. If not, this would be a good time to wipe the disk clean and partition it to your liking. I believe that you will have to install Windows before installing FreeBSD. Good Luck! -- Gerard