From owner-freebsd-questions@FreeBSD.ORG Sat Nov 3 05:22:33 2007 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 870B616A417 for ; Sat, 3 Nov 2007 05:22:33 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id 6F41513C4B3 for ; Sat, 3 Nov 2007 05:22:33 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id lA35ME69051446; Sat, 3 Nov 2007 01:22:15 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-questions@freebsd.org Date: Sat, 3 Nov 2007 01:22:17 -0400 User-Agent: KMail/1.9.7 References: In-Reply-To: X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711030122.17441.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Jon Drukman Subject: Re: Mounting/examining dd 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: Sat, 03 Nov 2007 05:22:33 -0000 On Friday 02 November 2007, Jon Drukman wrote: > I was trying to transplant my system from a small, old drive to a big, > new one. I made a dd dump of the entire small drive, but then I > accidentally destroyed the drive (be careful with bare drives and > metal PC cases...) > > Anyway, I have the dd file but I don't have a spare drive onto which > to copy it. Is there a way to read its contents/mount it/explore > it/hopefully extract files from it on a running system? Yes there is: mdconfig -a -t vnode -f "/path/to/dd/image/file" That will cause the file to be treated as an md device. See also man mdconfig. The output of that command is the newly created /dev/md? device node. Depending on whether you dumped the whole disk, a slice, or a partition there may be additional devices. If you dd'ed the whole disk your former root partition might show up as /dev/md0s1a, for example. Once you've identified the device node(s) that contain(s) the filesystem(s) you're interested in, just mount it/them like you would any other device, e.g. mount /dev/md0s1a /mnt JN