# [SOLVED] Trying to encrypt my hd with dmcrypt!

## freelancer

Hi,

I'm trying to encrypt my second SATA-harddisk /dev/sdb3 (filesystem: ext2) with dmcrypt. I'm using this HOW-TO. 

When I try to install the modules, mentioned in the How-To I get error-messages.

```
WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/drivers/md/dm-crypt.ko needs unknown symbol crypto_alloc_tfm

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/drivers/md/dm-crypt.ko needs unknown symbol crypto_free_tfm

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/crypto/blowfish.ko needs unknown symbol crypto_unregister_alg

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/crypto/blowfish.ko needs unknown symbol crypto_register_alg

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/crypto/serpent.ko needs unknown symbol crypto_unregister_alg

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/crypto/serpent.ko needs unknown symbol crypto_register_alg

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/crypto/aes.ko needs unknown symbol crypto_unregister_alg

WARNING: /lib/modules/2.6.17-gentoo-r8/kernel/crypto/aes.ko needs unknown symbol crypto_register_alg
```

```
# cryptsetup -yv create disk /dev/sdb3

Enter passphrase:

Verify passphrase:

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

```
# dmesg | grep crypt

aes: Unknown symbol crypto_unregister_alg

aes: Unknown symbol crypto_register_alg

dm_crypt: Unknown symbol crypto_alloc_tfm

dm_crypt: Unknown symbol crypto_free_tfm

blowfish: Unknown symbol crypto_unregister_alg

blowfish: Unknown symbol crypto_register_alg

dm_crypt: Unknown symbol crypto_alloc_tfm

dm_crypt: Unknown symbol crypto_free_tfm

dm_crypt: Unknown symbol crypto_alloc_tfm

dm_crypt: Unknown symbol crypto_free_tfm

```

I hope you can help me!Last edited by freelancer on Fri Oct 20, 2006 11:17 pm; edited 1 time in total

----------

## Princess Nell

It looks like your kernel configuration is missing a really basic and essential part. Make sure that

CONFIG_CRYPTO=y.

cd /usr/src/linux and make mrproper before recompiling the kernel.

----------

## freelancer

Great, I could compile my kernel without any errors. Modprobe loads the necessary modules but I can't use cryptsetup to create an encrypted partition.

```

# cryptsetup -vy create mycrypt /dev/sdb3

Enter passphrase:

Verify passphrase:

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

----------

## Princess Nell

Did you install the new kernel and reboot?

----------

## freelancer

Yes, did that and I also checked that dm-crypt get's loaded correct.

----------

## Princess Nell

I guess that something else is missing. Anything in dmesg?

----------

## freelancer

Just that:

```
 # dmesg | grep crypt

device-mapper: crypt: Device lookup failed
```

----------

## troymc

2 thoughts:

1) you don't have /dev/sdb3 mounted do you?

2) try depmod -a; if you didn't get a good depmod done after the new modules install, then it would have trouble loading them correctly.

troymc

----------

## freelancer

I checked both things and did a reboot...

then everything worked fine.

Thanks for your help!

----------

