Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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. I'm fairly desperate!

Cheers, Thomas.

share|improve this question
add comment

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

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

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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