Re: *Help!* Where is device partition info stored by the kernel?

Steven S. Dick (ssd@nevets.oau.org)
Fri, 13 Jun 1997 08:58:41 -0400 (EDT)


grant@knot.torque.net wrote:
>There's probably a better solution, but at worst you could write a little
>program to use the BLKGETSIZE ioctl to extract the _size_ of each
>partition, and then deduce the layout from that.

Even better, each ext2fs partition has a superblock with a magic number in it.

Some time ago, I wrote a program called findsuper that looks for sectors
containing this magic number in the right place. Last I checked,
findsuper was part of the ext2fs distribution. (I can e-mail it out if
you can't find it.) Findsuper can find your ext2fs partitions, even if
you have no clue what your partition table should look like.

Steve