[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partition table woes



on Fri, Jul 27, 2001 at 12:13:10PM -0400, dman (dsh8290@rit.edu) wrote:
> On Fri, Jul 27, 2001 at 12:46:50AM -0700, Karsten M. Self wrote:

> | If you know how you sized your partitions, you can try plugging in the
> | appropriate values, and saving the table.  Since the partition table
> | doesn't actually modify disk data, this won't scramble your data.  I'd
> | restrict my mounts to read-only -- if you size things right, your
> | filesystems should match up, if you don't, they should break.  That's
> | the theory.
> | 
> | It's a bit seat-of-your-pants, and it's a last-ditch suggestion, and
> | it's crazy, but it might just work....
> 
> It worked, more-or-less for the first partition.  I knew where it
> started so it was just a matter of finding the end.  

This makes working out the remaining partitions a trail-and-error
process, which was somewhat implied in my first message.  Trick is that
the start/end of the first partitions doesn't change as you get them
worked out.

> The problem is, neither mount nor fsck seem to care if the partition
> is too big, only if it is too small.  

Assuming this, the trick is to size the first partition so that you can
find the start of the partitions following.

> I was hoping that there was some tool to (at the very least) give me a
> raw dump of a certain section of the disk that with a bit of RTFM on
> ext2 I could determine where the superblock (start of partition) is.

At the very least, 'dd' should provide the ability to do a raw scan of
the partition data:

    dd if=/dev/hda

...though you (may) need to dump this somewhere to go through it
(probably not a bad idea to image the partition anyway).

You might want to truck on out to one of the kernel developer lists and
find someone who's keen on filesystems who might be able to give you
pointers.  Ted T'so or Hans Reiser come to mind.

Looking at a list of Debian packages:

 - gpart      Guess PC disk partition table, find lost partitions
 - e2fsck-static A statically-linked version of the ext2 filesystem checker.
 - e2fsprogs   The EXT2 file system utilities and libraries.           

...gpart sounds promising.  You've tried this yet?

-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?       There is no K5 cabal
  http://gestalt-system.sourceforge.net/         http://www.kuro5hin.org
   Are these opinions my employer's?  Hah!  I don't believe them myself!

Attachment: pgpwlxB8bw5Jq.pgp
Description: PGP signature


Reply to: