4

I've upgraded my linux installation to kernel 2.6.38-2 (Debian testing). With the new kernel, loop-aes does not compile, so I cannot mount my encrypted volumes. I heared that it is possible to use some compatibility mode of cryptsetup to mount encrypted volumes of loop-aes, so my question is:

How can I do that?

I have been searching for hours with Google and couldn't find anything that worked. With loop-aes, I was mounting partitions with the following entry in /etc/fstab:

/dev/sdb2 /mount/data   ext4 user,noauto,loop,encryption=aes256 0 0

How would the cryptsetup command line look like? I would prefer an fstab entry, if possible, but a command line would do as well.

migrated from stackoverflow.com Apr 23 '11 at 22:05

This question came from our site for professional and enthusiast programmers.

3

cryptsetup loopaesOpen <device> <name> [--key-size 128] --key-file <key-file>, according to http://code.google.com/p/cryptsetup/wiki/Cryptsetup130. If your cryptsetup isn't 1.3.0, you're gonna have to download that version and compile it.

cryptsetup opens the volume and creates a new block device in /dev/mapper/<name> You then have to use the mount command after cryptsetup to actually use it.

I know crypttab is involved in setting up boot-type encrypted volumes but I wrote my own scripts to manually mount them on demand so I have no experience with that, unfortunately.

  • I'll go test this one ASAP. – hochl Apr 26 '11 at 9:05
  • Well this one took some time, had to push it back in my work queue, but now I've migrated to cryptsetup (finally!) and it works as described. Thanks! – hochl Dec 27 '11 at 13:59
0

If you are using cryptsetup edit /etc/crypttab and put in:

sdb2-data /dev/sdb2 none cipher=aes-cbc-plain,size=256,hash=sha512,noauto

Next edit /etc/fstab and add:

/dev/mapper/sdb2-data /mount/data ext4 user,noauto 0 0

Because you specified noauto you will need to run:

cryptdisks_start sdb2-data
mount /dev/mapper/sdb2-data

If you didn't have noauto then it would prompt for the password during bootup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.