From owner-freebsd-questions Fri Dec 31 9:30:24 1999 Delivered-To: freebsd-questions@freebsd.org Received: from florence.pavilion.net (florence.pavilion.net [212.74.0.25]) by hub.freebsd.org (Postfix) with ESMTP id 23BE714E2C for ; Fri, 31 Dec 1999 09:30:21 -0800 (PST) (envelope-from joe@florence.pavilion.net) Received: (from joe@localhost) by florence.pavilion.net (8.9.3/8.8.8) id RAA39782; Fri, 31 Dec 1999 17:30:17 GMT (envelope-from joe) Date: Fri, 31 Dec 1999 17:30:17 +0000 From: Josef Karthauser To: Ford Prefect Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Data Recovery and FreeBSD's fdisk behavior Message-ID: <19991231173017.I35536@florence.pavilion.net> References: <3.0.3.32.19991230213150.0070d220@pop.interaccess.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <3.0.3.32.19991230213150.0070d220@pop.interaccess.com> X-NCC-RegID: uk.pavilion Organisation: Pavilion Internet plc, Lees House, 21-23 Dyke Road, Brighton, England Phone: +44-845-333-5000 Fax: +44-845-333-5001 Mobile: +44-403-596893 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Search for my name in the -hackers mail archive. I've posted a c program for recovering the parameters for the FreeBSD disklabel. Joe On Thu, Dec 30, 1999 at 09:31:50PM -0600, Ford Prefect wrote: > In an unconcious effort to prove to myself the biggest y2k problem is going > to be with humans, not machines I erased the partition table on my FreeBSD > drive. (I'd go into details about how this happened but I'm sure I sound > stupid enough already :) ) > > Here's the situation, I was/am triple booting FreeBSD/Win98/WinNT Between > two drives. > The M$ OSes share a 27GB drive, while FreeBSD was running happliy on a 12GB > drive. > > In repairing the Windows Drive I made a mistake using M$ FDISK and erased > the FreeBSD partition on the FreeBSD Drive. After cursing a few times, I > decided to do somehting about it. I knew that I had made my whole drive > FreeBSD, and that it wasn't "dangerously dedicated" so I thought the first > thing to try is writing a new partition entry. So I did using a linux disk > I have. (I knew he linux fdisk I had only wrote the partition table, so it > wouldn't corrupt anything extra (providing the MS FDISK didn't erase > anytihng extra)) > > This worked, mostly. I could once again boot into FreeBSD, and it mounted > MOST of my drives with less complaining than I would have expected. Except > for /usr. /usr has some SUPERBLOCK errors which I can't seem to get rid of. > (failure to read block 16, 17, 18 or something similar, sorry for vaugeness) > > I of course know very little about FreeBSD filesystem structure. But I have > an idea of what may be the problem. Though I could be completely wrong > about this. I seem to recall FreeBSD not using ALL of my disk, but rather a > very small portion of it was unused. Since my new partition entry claims to > use everthing, the new partition would be slightly larger than the old. > This might leave a gap at the end of my final slice in that partition which > happens to be /usr. > If that sounds reasonable, I then need to do one of two things: > A) Calculate the partition would be using FreeBSD's fdisk and create a new > entry using that data. and hope it works. > B) Boot off a FreeBSD CD and use its fdisk to write a new partition table > (IE let FreeBSD do B for me) > > I prefer B, that it relies on FreeBSD NOT writing anything beyond a > partition table. I don't know if this is the case. (Is it?) > > Both rely on my earlier assumptions being true, are they? Are they even > resonable? > Perhaps there are some nice flags for fsck I should be using that would fix > the disk for me? > > Any assistance would be appreciated. > > I also could use a sugesstions for a good low cost backup solutions that > could be used for say backing up 12Gigs of FreeBSD :) > > Again, thanks for any and all assistance in my salvage attempt. > Perhaps I should pay more attention to thos warning messages next time. > > -Steve > > > > *=====================================================* > \ Ford Prefect Ahead of my time. \ > \ fordp@guide.chi.il.us but only by a week. \ > \ homepage.interaccess.com/~fordp \ > \ \ > \ ((In esperanto where available)) \ > *=====================================================* > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Josef Karthauser FreeBSD: Take the red pill and we'll show you just how Technical Manager deep the rabbit hole goes. (http://www.uk.freebsd.org) Pavilion Internet plc. [joe@pavilion.net, joe@freebsd.org, joe@tao.org.uk] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message