Subject: Re: I mangled my root drive's disklabel. I need advice!
To: David Eckhardt <David_Eckhardt@piper.nectar.cs.cmu.edu>
From: Brett Lymn <blymn@baea.com.au>
List: netbsd-help
Date: 05/12/1998 14:28:11
According to David Eckhardt:
>
>I believe you will find multiple superblocks ("struct fs" in
>/usr/include/ufs/ffs/fs.h) in each partition.  If I recall, newfs
>tends to put one at sector 64 (63?) as well as sector 0.
>

That is not the disklabel so it would not be much help here and, by
the way, IIRC newfs has a -N option that tells you what it would do to
a disk without taking any actions.  This is an easy way of finding out
where backup superblocks are on the disk.  Of course, that all depends
on you having the same geometry in the disk lable :-/

One suggestion you could try to get the disk label back is to just
label the disk with one partition that starts at the first cylinder.
If you carefully mount the disk read only then you should be able to
see some of the disk structure.  Have a look in /etc on the disk to
see if you can find an updated disktab file.  Failing that, you can
at least get back the partitions you had from the fstab, have a rough
stab at what you thought your sizes were and set them up - use fsck/fsdb to
check for the superblock.  Step & repeat.

-- 
Brett Lymn, Computer Systems Administrator, British Aerospace Australia
===============================================================================
  +++ Divide By Cucumber Error.  Please Reinstall Universe And Reboot +++
  - Hogfather, Terry Pratchett.