-   Linux - Software (
-   -   Running cryptsetup returns error (

Steviepower 04-05-2012 03:33 PM

Running cryptsetup returns error

While I'm trying to encrypt an external harddrive on a debian6 server I'm having some troubles running cryptsetup. I tested this with a usb memory stick and it worked fine on ubuntu but now I have this server with an external harddrive connected to it, and it returns an error:

Cannot initialize device-mapper. Is dm_mod kernel module loaded?
Presumably this means the dm_mod kernel module isn't loaded. My question here is where do I get this from and how do I make sure it will be loaded?
quick google search returned:

steven@server:~$ sudo modprobe dm_mod
FATAL: Error inserting dm_mod (/lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-mod.ko): Unknown symbol in module, or unknown parameter (see dmesg)

What could this be and what am I not doing that I should do?


btw, tried this on my ubuntu laptop:
worked fine.

Steviepower 04-05-2012 03:56 PM

Oh and I found out the module is called dm, not dm_mod apparently...

Steviepower 04-05-2012 04:17 PM

also found this:

- Check that you have the device mapper and the crypt target in your kernel. The output of "dmsetup targets" should list a "crypt" target. If it is not there or the command fails, add device mapper and crypt-target to the kernel.

But how do I do this? Its a server distro... I don't feel like doing much things on there because it's a production system, I just want to be able to do secure backups from it.

Steviepower 04-06-2012 03:12 AM

I looked into modprobe and checked if the module was loaded by:

modproble -l|grep dm
and among other things it returned this:



So it does seem to be loaded!

Steviepower 04-06-2012 04:46 AM

on the other hand lsmod doesn't show an entry for dm-mod and when I try to load it by using modprobe dm-mod I get this:

steven@server:~$ sudo modprobe dm-mod
FATAL: Error inserting dm_mod (/lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-mod.ko): Unknown symbol in module, or unknown parameter (see dmesg

linuxStudent11 04-17-2012 07:35 PM

What odes it say in dmesg? (try `less /var/log/dmesg` or just `dmesg | tail`)

Steviepower 04-18-2012 12:50 AM

all I get is:

[22433716.203107] dm_mod: Unknown symbol scsi_verify_blk_ioctl

H_TeXMeX_H 04-18-2012 03:27 AM

If you reply to your own thread, you take it off the zero reply list and you will get much less attention that other threads. I never saw this thread before.

I would say the problem may lie in how the kernel module was compiled. The module may have been compiled out-of-tree or for a different kernel config or maybe other modules are loaded that interfere with this one (like the SATA controller module, which may explain why it works with a USB stick).

You need the dm_mod and dm_crypt to use cryptsetup. Make sure the kernel and modules are installed properly and using the same config.

Can you post the output of 'lsmod' and 'lspci -k'.

All times are GMT -5. The time now is 06:21 AM.