Subject: Re: tool to recomputer/reconstruct a trashed disklabel?
To: Lubomir Sedlacik <salo@Xtrmntr.org>
From: Laine Stump <laine@laine.org>
List: netbsd-users
Date: 04/27/2003 22:11:20
>On Sun, Apr 27, 2003 at 04:58:49PM +0300, Laine Stump wrote:
> > Is there any utility that will search through the disk and find the
> > start of FFS partitions (and maybe even their sizes)? Failing that, is
> > there a short primer somewhere on what the start of an FFS partition
> > looks like so I can whack together a quick tool to do so? Or should I
> > give up and start reinstalling/building/configuring?

At 04:13 PM 4/27/2003 +0200, Lubomir Sedlacik wrote:
>last time something similar happened to me (trashed disklabel when
>splitting laptop drive and booting off swap partition) i booted from old
>1.5 cd i had around and searched the drive for disklabel backup in
>/var/backups with `less /dev/rwd0d` and seeking for keywords from
>disklabel.  it took some time (few tens of minutes) to find it but
>eventually i got it and recovered the disklabel with `disklabel -R`.

Thanks, that's useful info! (The exact file is 
/var/backups/work/disklabel.wd?, but of course the exact name isn't really 
important when you can't get to the filesystem through normal means 
anyway!). I never even noticed before that all that stuff was being 
archived in /var/backups (and versioned with rcs too - a nice touch).

I was even luckier - after sending the message, I remembered that I had 
originally created this disk by making a copy of another disk with Ghost. 
SO I just hooked that disk up and copied its disklabel to the broken one, 
and now everything is ship shape again!