From owner-freebsd-questions Wed Oct 29 00:44:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA02054 for questions-outgoing; Wed, 29 Oct 1997 00:44:46 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA02046 for ; Wed, 29 Oct 1997 00:44:41 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.7/8.8.5) id TAA21879; Wed, 29 Oct 1997 19:14:26 +1030 (CST) Message-ID: <19971029191426.36457@lemis.com> Date: Wed, 29 Oct 1997 19:14:26 +1030 From: Greg Lehey To: Gopakumar H Pillai Cc: questions@FreeBSD.ORG Subject: Re: Help in disk recovery References: <34569085.F7A8AA41@global.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84e In-Reply-To: <34569085.F7A8AA41@global.com>; from Gopakumar H Pillai on Tue, Oct 28, 1997 at 05:25:25PM -0800 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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