My computer was interrupted while upgrading from 14.04 to 16.04. Afterward I rebooted and ran

sudo dpkg --configure -a

and rebooted again. Now, when prompted for my password on startup, nothing I enter works. I've checked caps lock and num lock and typed carefully, and have never mucked around with different keyboards. Indeed, navigating to GRUB and typing there, everything I type looks as expected.

Attempting to run from recovery mode leads to this exchange:

Please unlock disk sda5_crypt:

(I enter password)

Failed to setup dm-crypt key mapping for device /dev/disk/by-uuid/[some numbers]

Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).

cryptsetup: cryptsetup failed, bad password or options?

It's not clear to me how to fix this (apparent) issue with the kernel without being able to access a normal command line.


Not quite a solution to the problem as posed, but I ended up booting from an old kernel where sda5_crypt worked.

  • and did you uninstall/reinstall the newer kernel to see if the proper crypto module gets also installed ? that is the kernel-version you are running ? (have installed and try to run ?) I made updates from 4.4 till 48 without and problems using a encrypted home/disk.
    – 0x0C4
    Aug 21 '16 at 9:05

When I run cryptsetup --help from Ubuntu 14.04LTS it shows the following at the end of the usual options:-

Default compiled-in key and passphrase parameters:
        Maximum keyfile size: 8192kB, Maximum interactive passphrase length 512 (characters)
Default PBKDF2 iteration time for LUKS: 1000 (ms)

Default compiled-in device cipher parameters:
        loop-AES: aes, Key 256 bits
        plain: aes-cbc-essiv:sha256, Key: 256 bits, Password hashing: ripemd160
        LUKS1: aes-xts-plain64, Key: 256 bits, LUKS header hashing: sha1, RNG: /dev/urandom

You may want to check if the aes module is loaded in your kernel, using lsmod | grep aes

http://crunchbang.org/forums/viewtopic.php?id=37276 had useful information regarding which modules are needed when the error you mention appears.

In my kernel, the module kernel/arch/x86/crypto/aes-x86_64.ko seems to provide it. It looks like it's a standard part of the kernel, so I'm guessing it's just not loaded by default. The dependency tree in /proc/modules on my machine shows aes_x86_64 => aesni_intel and aesni_intel doesn't seem to have any dependencies, so it should be straightforward to load.

Hope that helps

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.