From owner-freebsd-questions@FreeBSD.ORG Sat Nov 3 16:53:43 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 1A57816A41B for ; Sat, 3 Nov 2007 16:53:43 +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 E420713C48D for ; Sat, 3 Nov 2007 16:53:42 +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 lA3GAD69003686; Sat, 3 Nov 2007 12:10:14 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: "Jon Drukman" Date: Sat, 3 Nov 2007 12:10:03 -0400 User-Agent: KMail/1.9.7 References: <200711030122.17441.lists@jnielsen.net> 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: <200711031210.05691.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: freebsd-questions@freebsd.org 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 16:53:43 -0000 On Saturday 03 November 2007, Jon Drukman wrote: > Hm, anything that works in Freebsd 4.9? I've never been able to > install 5.0 or higher on this machine, it always freezes when booting. In 4.x the analogous command is called vnconfig with slightly different syntax. > On Nov 2, 2007 10:22 PM, John Nielsen wrote: > > 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