From owner-freebsd-fs@FreeBSD.ORG Wed Mar 25 22:13:01 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 519741065675 for ; Wed, 25 Mar 2009 22:13:01 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id DAE698FC23 for ; Wed, 25 Mar 2009 22:13:00 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-37-253.dynamic.qsc.de [92.196.37.253]) by mx02.qsc.de (Postfix) with ESMTP id C1D4E16C00DF; Wed, 25 Mar 2009 22:48:12 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n2PLm7Fw001620; Wed, 25 Mar 2009 22:48:07 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 25 Mar 2009 22:48:07 +0100 From: Polytropon To: FreeBSD FS Message-Id: <20090325224807.81016dd9.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Repairing a defective UFS 2 partition with another BSD's fsck X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2009 22:13:01 -0000 Dear -fs list, last night I had an idea how I could have a chance to repair my defective UFS partition. To remember, this is the whole story: http://kerneltrap.org/mailarchive/freebsd-fs/2008/11/2/3894714 "Repairing a defective UFS 2 partition with fsck_ffs (or other means)" I thought about the following: As far as I know, UFS isn't only used by FreeBSD, but also by OpenBSD and NetBSD. Variations should be less than, let's say, with Solaris UFS. So it may be that I can use the fsck utility of OpenBSD or NetBSD to check and repair the UFS dd duplicate where FreeBSD's fsck fails with fsck_ffs: bad inode number 306176 to nextinode To use with NetBSD, I've got a NetBSD Live! 2007 live system CD here. For OpenBSD... well, I don't know if they offer any live file system? The only commands I'd need are mount and fsck (both for UFS only). The system should be bootable via CD. Then I would need a shell to do something like this: # mkdir /temp # mount -t ufs -o rw /dev/wd1s1c /temp # cd /temp/rescue # fsck -t ufs -yf ad1s1f.dd In case NetBSD's or OpenBSD's fsck can't operate on the bare file, I'd think about something like: # mkdir /temp # mount -t ufs -o rw /dev/wd1s1c /temp # cd /temp/rescue # mdconfig -a -t vnode -u 10 -f ad1s1f.dd # fsck -t ufs -yf /dev/md10 What do you think, is this even possible? Should I try it? Please keep me CC because I'm on the questions@ list only. Thanks! I'll cross-post it to questions@ in case someone there as an idea for this really strange problem - remember, I'm the second (!) being on this planet having encountered this particular problem. I hope that's an acceptable behaviour. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...