cryptoloop

cryptsetup

I switched already quite a while ago from the old cryptoloop technology to the newer cryptsetup technology. However, I still forget how to manually create and mount encrypted volumes, because I do this rarely. Here are the commands:
cryptsetup create cryptovolume /dev/mapper/logical_volume
mount /dev/mapper/cryptovolume /mountpoint

In this case I mapped a logical volume, but of course you can map physical volumes, too:
cryptsetup create cryptovolume /dev/sdb1
mount /dev/mapper/cryptovolume /mountpoint

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.