Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got /dev/sdb1 encrypted and mounted as /home.

The following line is in /etc/fstab:

/dev/sdb1       /home           ext3    noauto,loop=/dev/loop6,encryption=AES128

and

#mount /home

works fine, but

#losetup -e encryption=AES128 /dev/loop0 /dev/sdb1

which I'm sure always used to work, gives:

ioctl: LOOP_SET_STATUS: No such file or directory, requested cipher or key length (128 bits) not supported by kernel

Does anyone know why? If the mechanism for aes encryption over loopback devices has been changed, how am I supposed to fsck such a drive?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If I'm not mistaken, -e is shorthand for --encryption. Try the next command instead:

losetup --encryption AES128 /dev/loop0 /dev/sdb1

or:

losetup -e AES128 /dev/loop0 /dev/sdb1

References:

$ losetup --help
 -e | --encryption <type> enable data encryption with specified <name/num>

Taken from the examples section of man losetup:

          # dd if=/dev/zero of=/file bs=1k count=100
          # losetup -e des /dev/loop0 /file
          Password:
          Init (up to 16 hex digits):
          # mkfs -t ext2 /dev/loop0 100
          # mount -t ext2 /dev/loop0 /mnt
           ...
          # umount /dev/loop0
          # losetup -d /dev/loop0
share|improve this answer
    
Oops. I feel really dim now. Thank you very much. Assuming you don't mind, I'll ask for this question to be deleted, it's just noise. But thank you! –  John Lawrence Aspden Mar 16 '11 at 21:32
    
Do not delete it, it can help people who look for the right syntax. This question is not dumb, this one is. –  Lekensteyn Mar 16 '11 at 22:00

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.