Date: Sat, 3 Nov 2007 01:22:17 -0400 From: John Nielsen <lists@jnielsen.net> To: freebsd-questions@freebsd.org Cc: Jon Drukman <jdrukman@gmail.com> Subject: Re: Mounting/examining dd image? Message-ID: <200711030122.17441.lists@jnielsen.net> In-Reply-To: <fe46e67d0711021655o59d5a734nbb1cacc692d1aab1@mail.gmail.com> References: <fe46e67d0711021655o59d5a734nbb1cacc692d1aab1@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711030122.17441.lists>