From owner-freebsd-questions@FreeBSD.ORG Fri Jul 31 10:52:43 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB2B41065673 for ; Fri, 31 Jul 2009 10:52:43 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF378FC16 for ; Fri, 31 Jul 2009 10:52:42 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id n6VAb9De064888; Fri, 31 Jul 2009 12:37:10 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 8EA5ABA8C; Fri, 31 Jul 2009 12:37:09 +0200 (CEST) Date: Fri, 31 Jul 2009 12:37:09 +0200 From: Roland Smith To: cjclark@alum.mit.edu Message-ID: <20090731103709.GA61356@slackbox.xs4all.nl> References: <20090731064650.GB93341@goku.i.pumpky.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20090731064650.GB93341@goku.i.pumpky.net> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: questions@freebsd.org Subject: Re: Recovering Trashed Filesystems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 10:52:44 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 30, 2009 at 11:46:50PM -0700, Crist J. Clark wrote: > I have two file systems in very sad shape that I would like > to retrieve some files from. I've net booted the sick box > and can access the two bad UFSs. One file system, the root > file system, isn't too bad off. However, the usr directory > is messed up. > Now I can "mount -r /dev/ad0s1a /mnt" to get the above results, > but "fsck /dev/ad0s1a" returns, >=20 > # fsck /dev/ad0s1a > ** /dev/ad0s1a > BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALT= ERNATE >=20 > LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y >=20 > 32 is not a file system superblock > SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE > -b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE > SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8). Try 'fsck_ffs -b 160 /dev/ad0s1a' assuming you're using a UFS2 filesystem. If that doesn't work, try adding the '-D' flag, but heed the warning in fsck_ffs(8). Only run fsck_ffs when the filesystem is not mounted! If you can, make a copy of the damaged fs and save it to another disk or another machine. Then try to repair the copy. If it fails, you haven't lost your original data. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkpyyVUACgkQEnfvsMMhpyVf+wCeIeVOIab7RBM1oT5RKDbqPg42 wwcAn1ztyjCOnk2uza++PUv4g9/GyUvj =9VlJ -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--