Mounting disk image files and encrypted filesystems/partitions
By jeltsch on Sat, 05/26/2007 - 13:47To dump a disk (or a partition) into a file, you use the following command:
dd if=/dev/hda3 of=file.bin
This command writes the complete data on the hda3 partition into the file file.bin.
To mount the filesystem that is in the file, you need to create a loopback device:
losetup /dev/loop0 file.bin
Now you can mount the filesystem as usual:
mount -r -t filesystemtype /dev/loop0 /mnt/mountpoint
Apparently, one can combine the last two commands into one: