Subject: Re: Recover corrupt root partition?
To: Paul Goyette <Paul@pgoyette.bdt.com>
From: Ken Nakata <kenn@romulus.rutgers.edu>
List: netbsd-users
Date: 04/25/1995 14:17:23
> Ouch!
> 
> Running NetBSD/Mac (-current as of 4/15), I just had one of my hard drives
> die a miserable death on me.  In the process, it seems to have corrupted my
> root / partition.  Now, the boot utility refuses to load NetBSD,
> complaining that the root file system has an incorrect magic number.

Hmmm..., is this just a coincidence?  I just had a "bad dir" panic and
lost entire root (sd0a) and /home (sd1a) partitions ("wrong magic
number") as well as many files in /usr (sd0g) partition, with a
current kernel as of 4/18.  I mkfsed root and home and re-installed
everything.  Also, I'm almost done with the whole system regeneration
(all except /usr/games) from the tar balls as of 4/15 (I'm going to
sup later today).  The new kernel built out of 4/15 tar balls seems
to have some fs errors, compared to earlier 4/9 current kernel...

> Of course, I _could_ reload from master copy of NetBSD, but I really would
> like to recover some of the files that were on my root, like those that
> were in /etc.  (Please - no chastising me for failure to make a backup -
> I've already got scars from the self-flagellation.)  Anyone know of a way
> to get at them?  Or maybe a way to fake the right magic number?

Is there anyway to recover from "wrong magic number" error?  I always
thought there isn't (maybe there is if you can ever reboot the damn
thing)... If there is, I'd like to know, too.

As for back-up, since I don't have a back-up device (tape drives or
removables), I devided the old root partition sd0a into two partitions
sd0a and sd0f, changed rc.local so that it makes a back-up of sd0a in
sd0f...  I don't have any means to back /usr and /home up, so I should
really get something before another major disaster strikes...

Ken