# dm-crypt modprobe error

## Deep_Blue

Hello

i am just trying to encrypt a partition using dm-crypt with LUKS. 

i just added all needed kernel modules, but when doing

```

# modprobe dm-crypt

FATAL: Error inserting dm_crypt (/lib/modules/2.6.22-gentoo-r5/kernel/drivers/md/dm-crypt.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

dmesg says: 

```

dm_crypt: Unknown symbol crypto_alloc_base

dm_crypt: Unknown symbol crypto_free_tfm

```

i already googled, but i havent found anything helpful

regards

DeepB

----------

## Sadako

Did you by any chance update that particular kernel version without rebuilding and/or re-installing the modules as well?

It might be simpler just to leave dmcrypt built into the kernel.

----------

## Deep_Blue

with it built into the kernel, i get following error when doing the cryptsetup:

```
# cryptsetup luksFormat /dev/hdd1 

WARNING!

========

This will overwrite data on /dev/hdd1 irrevocably.

Are you sure? (Type uppercase yes): YES

Enter LUKS passphrase: 

Verify passphrase: 

Failed to setup dm-crypt key mapping.

Check kernel for support for the aes-cbc-essiv:sha256 cipher spec and verify that /dev/hdd1 contains at least 133 sectors.

Failed to write to key storage.

Command failed.

```

regards

DeepB

----------

## Sadako

What does `grep "CONFIG_CRYPTO_SHA256\|CONFIG_CRYPTO_CBC" /usr/src/linux/.config` return, and if either/both of these are still enabled as modules are they loaded before you run cryptsetup?

----------

## Deep_Blue

```
CONFIG_CRYPTO_SHA256=y

CONFIG_CRYPTO_CBC=y

```

regards

DeepB

----------

## Sadako

 *Deep_Blue wrote:*   

> 
> 
> ```
> CONFIG_CRYPTO_SHA256=y
> 
> ...

  :Confused: 

And that's definitely the config of the running kernel?

Try running cryptsetup without the luks extensions on /dev/hdd1 and see what happens, eg;

```
cryptsetup -c aes-cbc-essiv:sha256 --readonly -s 384 create hdd1test /dev/hdd1
```

This won't actually write anything to hdd1, so should be perfectly safe to try.

----------

## Deep_Blue

```
# cryptsetup -c aes-cbc-essiv:sha256 --readonly -s 384 create hdd1test /dev/hdd1

Enter passphrase: 

Command failed: device-mapper: reload ioctl failed: Invalid argument

```

i folowed this guide:

http://de.gentoo-wiki.com/DM-Crypt

regards

DeepB

----------

## Deep_Blue

no ideas?

regards

DeepB

----------

