From owner-freebsd-hackers Fri Sep 10 1:27: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from p.funk.org (node1484.a2000.nl [62.108.20.132]) by hub.freebsd.org (Postfix) with ESMTP id 84A6D153DB; Fri, 10 Sep 1999 01:27:01 -0700 (PDT) (envelope-from alexlh@p.funk.org) Received: (from alexlh@localhost) by p.funk.org (8.9.3/8.9.3) id KAA06248; Fri, 10 Sep 1999 10:26:26 +0200 (CEST) (envelope-from alexlh) Date: Fri, 10 Sep 1999 10:26:26 +0200 From: Alex Le Heux To: David Gilbert Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Superblock. Message-ID: <19990910102626.A5384@funk.org> References: <14294.41194.422190.809990@trooper.velocet.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <14294.41194.422190.809990@trooper.velocet.ca>; from David Gilbert on Wed, Sep 08, 1999 at 01:46:18PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I once had a similar situation: I had wiped my disklabel. I forgot what it was exactly what I did, but it was something along the lines of this: - boot fixit cdrom - run a commandline like this: hd /dev/rwdnnn | grep "hh hh hh" (where 'hh hh hh' is the superblock magic number, I can't find it right now, but that's probably because it's still before coffee for me) - Let is run for a while. Until is has found all the filesystems. The magic number will appear quite often, but there are fixed offsets for each consecutive superblock, so you can filter out which ones are 'real' and which ones are not. - After this you can figure out where your filesystems start. This was enough for me, as I had only wiped the disklabel. You'll have to do some additional juggling to figure out the right partitiontable entries. I realise this is all very vague, but it was a few years ago so my memory is a bit hazy. Good luck :) Alex On Wed, Sep 08, 1999 at 01:46:18PM -0400, David Gilbert wrote: > So... I lost my partition table. I'm willing to spend a little time > on this. Is there a byte sequence that I might recognise in a > superblock or at the start of a partition? I know this isn't an easy > task, but man 5 fs leads me to believe that I might find: > > #define FS_MAGIC 0x011954 /* the fast filesystem magic number */ > #define FS_OKAY 0x7c269d38 /* superblock checksum */ > > ... but I don't see those bytes. Any hints? > > I'm willing to post a description of a solution for the FAQ if I can > find the filesystems. > > Dave. > > -- > ============================================================================ > |David Gilbert, Velocet Communications. | Two things can only be | > |Mail: dgilbert@velocet.net | equal if and only if they | > |http://www.velocet.net/~dgilbert | are precisely opposite. | > =========================================================GLO================ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- +--------------------------------+-------------------+ | SMTP: | E-Gold: 101979 | | ICBM: N52 22.64'6 E4 51.54'1 | PGP: 0x1d512a3f | +--------------------------------+-------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message