lkml.org 
[lkml]   [1997]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: *Help!* Where is device partition info stored by the kernel?
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


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.012 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site