From owner-freebsd-questions@FreeBSD.ORG Wed Dec 3 05:38:11 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3729816A4CE for ; Wed, 3 Dec 2003 05:38:11 -0800 (PST) Received: from rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85C0C43FE0 for ; Wed, 3 Dec 2003 05:38:09 -0800 (PST) (envelope-from itetcu@apropo.ro) Received: (qmail 21102 invoked from network); 3 Dec 2003 13:38:08 -0000 Received: from unknown (HELO it.buh.cameradicommercio.ro) (81.196.25.19) by mail.rdsnet.ro with SMTP; 3 Dec 2003 13:38:08 -0000 Date: Wed, 3 Dec 2003 15:39:02 +0200 From: Ion-Mihai Tetcu To: scott@sremick.net Message-Id: <20031203153902.1d42b9d9.itetcu@apropo.ro> In-Reply-To: <20031203080612.54273.qmail@web41110.mail.yahoo.com> References: <20031203080612.54273.qmail@web41110.mail.yahoo.com> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: FreeBSD Subject: Re: "Cannot find file system superblock" error - how to recover? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2003 13:38:11 -0000 On Wed, 3 Dec 2003 00:06:12 -0800 (PST) "Scott I. Remick" wrote: > Running 5.1-REL on a system w/ 2 drives. Was saving a file to 2nd drive > (mounts as /data) and system suddenly froze then rebooted. Never good. Fsck > barfed on startup telling me I had to run it manually. The error I'm stuck > with is: > > /dev/ad6s1c > Cannot find file system superblock > /dev/ad6s1c: NOT LABELED AS A BSD FILE SYSTEM > > Searching on this error hasn't been very productive. Some people talk about > a "LOOK FOR ALTERNATE SUPERBLOCKS?" question that I'm not getting when I run > fsck. There's also mention of an undocumented -b option to fsck for fixing > this. FSCK_FFS(8) FreeBSD System Manager's Manual FSCK_FFS(8) NAME fsck_ffs, fsck_ufs -- file system consistency check and interactive repair SYNOPSIS fsck_ffs [-BFpfny] [-b block#] [-c level] [-m mode] filesystem ... -b Use the block specified immediately after the flag as the super block for the file system. Block 32 is usually an alternate super block. The key world is usually. > Then there's some scary manual method using dd: > > dd if=/dev/ad6s1c skip=32 of=/dev/ad6s1c seek=16 bs=512 count=16 Try doing a newfs -N and see if using some of the alternatives super-blocks in fsck_ufs will help. Note that the alternate superblock is no longer always at 32, it depends on the size of the file system. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/ufs/ffs/fs.h?rev=1.39&content-type=text/x-cvsweb-markup * Depending on the architecture and the media, the superblock may * reside in any one of four places. For tiny media where every block * counts, it is placed at the very front of the partition. Historically, * UFS1 placed it 8K from the front to leave room for the disk label and * a small bootstrap. For UFS2 it got moved to 64K from the front to leave * room for the disk label and a bigger bootstrap, and for really piggy * systems we check at 256K from the front if the first three fail. In * all cases the size of the superblock will be SBLOCKSIZE. All values are * given in byte-offset form, so they do not imply a sector size. The * SBLOCKSEARCH specifies the order in which the locations should be searched. */ #define SBLOCK_FLOPPY 0 #define SBLOCK_UFS1 8192 #define SBLOCK_UFS2 65536 #define SBLOCK_PIGGY262144 #define SBLOCKSIZE 8192 #define SBLOCKSEARCH \ { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 } -- IOnut Unregistered ;) FreeBSD user