Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 1995 10:25:27 -0700 (MST)
From:      Terry Lambert <>
To:        kuku@gilberto.physik.RWTH-Aachen.DE (Christoph P. Kukulies)
Subject:   Re: recovering a FS
Message-ID:  <>
In-Reply-To: <199509120606.IAA07544@gilberto.physik.RWTH-Aachen.DE> from "Christoph P. Kukulies" at Sep 12, 95 08:06:37 am

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> During the process of upgrading a machine to 2.1.0-950726-SNAP
> I inadvertently overwrote the partition of a 1GB SCSI disk wich
> was containing all my saved mail messages and such. "It's like
> you have broken with the past" at the moment :-).
> I managed to reestablish the partitioning scheme by running a
> install disk set partially on it. Now the only problem is that
> all disklabel data I can find doesn't seem to be the right one.
> Is there a way (with a program or whatever tool) to reestablish
> or recover a disklabel from a given disk?
> Presently the only chance to find certain things is to grep through
> the raw device :-(

Binary grep the raw device for the file system magic number; this will
give the location of the superblock structures.

Look at fsck for the definition of the "dynamic" fields in the superblock.
These will be non-zero on the first one.

This will give you the disk offset of the superblocks, which you can then
enter into your disklabel.

I have often though the perhaps swap should be first to ensure that
an overwrite like this would not necessarily touch important data.

On the other hand, you aren't supposed to put anything important in
the '/' but distribution files (and system configuration because of
stupid writeable '/etc'), and '/' has to be below 1024 for BIOS to
see it.

					Terry Lambert
Any opinions in this posting are my own and not those of my present
or previous employers.

Want to link to this message? Use this URL: <>