Guess what... I've got a disk where the partition table and the disklabel has
mysteriously disappeared!   Oops.

I've reconstructed the partition table, and now need to partition the disklabel.

If I mount /dev/wd2s1c I get the root (/) partition back, although the size
is obviously bogus in the disklabel;  now  I'd like to search for the other
partitions.  /etc/disktab tells me which partitions there used to be, but I
don't know where they start, or how large they are.

I'm guessing that it should be a fairly simple process of scanning the disk
for superblocks and from them I should be able to determine the start of each
partition and the sizes from there.

Can anyone fill me in on what to look for superblock wise please?  I've spent
a few hours reading the fsck docs and scanning through the header files and
source code, but haven't found the answer yet.

The data on the disk isn't crucial, I can rebuild the system if necessary, but
it seems that maybe I can spend less time writing a recovery tool than it would
take to start from scratch.

Thanks in advance,
Joe
-- 
Josef Karthauser        FreeBSD: How many times have you booted today?
Technical Manager       Viagra for your server (http://www.uk.freebsd.org)
Pavilion Internet plc.  [...@pavilion.net, j...@uk.freebsd.org, j...@tao.org.uk]


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to