Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 1994 22:33:22 -0800
From:      alan@math.ucsb.edu (Alan D. Trombla)
To:        dufault@hda.com
Cc:        questions@freebsd.org
Subject:   Re: HELP!! Boot block/disklabel wiped
Message-ID:  <19941226063321.AAA7123@emile.math.ucsb.edu>

next in thread | raw e-mail | index | archive | help
> From dufault@hda.com Sun Dec 25 17:07 PST 1994
> Subject: Re: HELP!! Boot block/disklabel wiped
> To: alan@math.ucsb.edu (Alan D. Trombla)
> 
> Alan D. Trombla writes:
> > 
> (...)
> > How can I reconstruct a disklabel? Is the disklabel/partition info 
> > stashed in some other well-known location on disk?  Do superblocks
> > know about there own partition?  Other partitions?  How can I locate a
> > superblock --- do they have some kind of magic cookie that I could
> > scan for?
> 
> Here is a program that might help you.  I wrote it when I accidentally
> trashed my disk label on a two partition drive and couldn't bear the
> thought of hours of spinning tapes to get it back.  Two lessons - be
> careful when labeling disks and print out your labels (or at least store
> them on other drives).
> 
> As long as your label is fairly simple you should be able to find the
> partitions.  Look for "hits" 16 blocks apart.  Here is the label
> on one of my drives:
> 
> > 8 partitions:
> > #        size   offset    fstype   [fsize bsize   cpg]
> >   a:    65536        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 31)
> >   b:    65536    65536      swap                        # (Cyl.   32 - 63)
> >   c:   586764        0    unused        0     0         # (Cyl.    0 - 286)
> >   d:   586764        0    unused        0     0         # (Cyl.    0 - 286)
> >   e:   455692   131072    4.2BSD     1024  8192    16   # (Cyl.   64 - 286)

Thanks for your help!  I wrote something very similar that
has allowed me to recover the usr partition.  root appears to be
trashed however, unless ...

One more question: I notice that your root partition above is at
offset 0; the freebsd2 installation assigned an offset of 32 to the
trashed disk and an offset of 91 to my new disk.  Where do these
numbers come from?  Can I be sure that the '32' is correct?  It seems
that that would cause trouble if wrong, but only with the root
partition?  The superblock doesn't seem to know about this.

My root partition is trashed so badly that fsck dumps core; should
this happen? 

Thanks,

Alan

Alan D.  Trombla------------------------------------------alan@math.ucsb.edu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19941226063321.AAA7123>