Mounting/examining dd image?
lists at jnielsen.net
Fri Nov 2 22:22:33 PDT 2007
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,
mount /dev/md0s1a /mnt
More information about the freebsd-questions