losetup

Mounting disk image files and encrypted filesystems/partitions

To 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:

Mouting of encrypted partitions under SuSE 9.3 (losetup, cryptotab, twofish256, twofishSL92)

I have one encrypted partition that was created under SuSE 9.2. After a fresh install of 9.3 (not an update) the mounting of that partition during bootup failed. I could, however, still mount it manually later using another loopdevice. To fix this, I had to change the encryption algorithm in /etc/cryptotab from twofish256 to twofishSL92. More detailed information.