# [Solved] DM-crypt over LVM2 not working

## Atomic Fusion

What I'm trying to do is make an encrypted logical volume.

When I attempt to run luksFormat on the logical volume, after entering and confirming my desired password, it fails with:

 *Quote:*   

> device-mapper: reload ioctl failed: No such file or directory
> 
> Failed to setup dm-crypt key mapping for device /dev/main/lvol1.
> 
> Check that the kernel supports aes-cbc-essiv:sha256 cipher (che3ck syslog for more info).
> ...

 The kernel says:

 *Quote:*   

> device-mapper: table: 253:3: crypt: Error creating IV
> 
> device-mapper: ioctl: error adding target to table
> 
> 

 This also happens when attempting to use luksOpen on a LUKS partition created with an Ubuntu liveCD.

However, dm-crypt appears to work fine on a non logical volume (sda2 has LUKS, inside which is my physical LVM volume).

Does anyone know what might be going on?

Thanks,

StephenLast edited by Atomic Fusion on Fri Jun 10, 2011 8:36 pm; edited 1 time in total

----------

## m0p

You don't have the necessary algorithms to decrypt it. You need to enable (or compile as modules) these in your kernel:

```
CONFIG_CRYPTO_AES

CONFIG_CRYPTO_CBC

CONFIG_CRYPTO_SHA256
```

----------

## Atomic Fusion

Yup, sorry. I was just being stupid.

However, do you know why essiv doesn't work with sha512?

----------

## dewhite

 *m0p wrote:*   

> You don't have the necessary algorithms to decrypt it. You need to enable (or compile as modules) these in your kernel:
> 
> ```
> CONFIG_CRYPTO_AES
> 
> ...

 

Just wanted to say thanks - I was racking my brain trying to figure this out on my system.  Turns out I was so busy thinking about that options for ciphers, I forgot to build in support for the hash:

```
CONFIG_CRYPTO_SHA256
```

Thanks!

----------

