Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 1999 10:26:26 +0200
From:      Alex Le Heux <alexlh@funk.org>
To:        David Gilbert <dgilbert@velocet.ca>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Superblock.
Message-ID:  <19990910102626.A5384@funk.org>
In-Reply-To: <14294.41194.422190.809990@trooper.velocet.ca>; from David Gilbert on Wed, Sep 08, 1999 at 01:46:18PM -0400
References:  <14294.41194.422190.809990@trooper.velocet.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <alexlh@funk.org>       |  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990910102626.A5384>