From owner-freebsd-questions@FreeBSD.ORG Fri Apr 3 23:47:02 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 073BE106564A for ; Fri, 3 Apr 2009 23:47:02 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id C63FC8FC1B for ; Fri, 3 Apr 2009 23:47:01 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Lpt6D-0003yd-8g for freebsd-questions@freebsd.org; Fri, 03 Apr 2009 16:47:01 -0700 Message-ID: <22878294.post@talk.nabble.com> Date: Fri, 3 Apr 2009 16:47:01 -0700 (PDT) From: snott To: freebsd-questions@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: skye@f4.ca References: <22862006.post@talk.nabble.com> <22872988.post@talk.nabble.com> Subject: Re: Recovering partitions from disk image? 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, 03 Apr 2009 23:47:02 -0000 Warren Block wrote: > > Looks like scan_ffs is reporting block size. I'd take a spare computer > with a blank disk and do a minimal FreeBSD install on it, setting the > units to blocks in the partition screen and duplicating the values given > by scan_ffs. Then connect your read-only image media and dd to each > partition, using dd's skip option to skip over previous partition data. > OK, I can see how that would work. I don't really have a spare computer/drive to muck around with though, at least not easily. If I can work directly on the disk image that would be much better. Could I fix the bsdlabel on the disk.img and mount it with mdconfig? I noticed scan_ffs can output a bsdlabel config file. Something like: # scan_ffs -sl disk.img > disk.label # bsdlabel -w -f disk.img auto # write a fresh default label # bsdlabel -e -f disk.img # and load in scan_ffs output # mdconfig -a -t vnode -f disk.img -u 0 If that looks like it might work, should I fsck the disk image before or after mounting with mdconfig or not at all? Do I risk kernel panic without fsck? Thanks, Skye -- View this message in context: http://www.nabble.com/Recovering-partitions-from-disk-image--tp22862006p22878294.html Sent from the freebsd-questions mailing list archive at Nabble.com.