Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 1997 19:14:26 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Gopakumar H Pillai <gopu@global.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Help in disk recovery
Message-ID:  <19971029191426.36457@lemis.com>
In-Reply-To: <34569085.F7A8AA41@global.com>; from Gopakumar H Pillai on Tue, Oct 28, 1997 at 05:25:25PM -0800
References:  <34569085.F7A8AA41@global.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 28, 1997 at 05:25:25PM -0800, Gopakumar H Pillai wrote:
> I am a sysadmin, fairly new to the job. I had a disk sd0s1e of 2GB size.
> In the process of finding out the device name of the tape drive I did a
> tar cvf rsd0 /tmp. 

My sympathies.  I thought that wasn't possible.

> The amount of data I have written over the raw disk is about
> 20K. This disk has /usr. I need to retrieve /usr, mainly my mails in
> /usr/home. How should I go about it?
>
> I retrieved sd1s1e, i.e. /var and got the /var/mail.
>
> I cannot mount or fsck this device since it complains, improper
> superblock. I have another machine with similar partitioning, would that
> help?

If the partition has been partially overwritten, you can run fsck like
this:

 # fsck -b 32 /dev/rsd0X

Replace X with the slice letter.

Hopefully this will work (unless you've overwritten block 32 as well,
in which case you'll have to guess where the next one would be).  If
you still have the partition table, you can try:

  # newfs -N /dev/rsd0X

MAKE SURE YOU USE -N!  That stops any change being made to the file
system.  If you omit it, you eliminate your chances of fixing the
problem.

Good luck
Greg




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