LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Running cryptsetup returns error (http://www.linuxquestions.org/questions/linux-software-2/running-cryptsetup-returns-error-938345/)

Steviepower 04-05-2012 02:33 PM

Running cryptsetup returns error
 
Hello,

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:
Code:

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:
Code:

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?

thanks,

btw, tried this on my ubuntu laptop: http://tipstrickshowtos.blogspot.com...into-your.html
worked fine.

Steviepower 04-05-2012 02:56 PM

Oh and I found out the module is called dm, not dm_mod apparently...
http://git.freebsd.your.org/gitweb/?...ded56651feb828

Steviepower 04-05-2012 03:17 PM

also found this:
Quote:

- 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.
source: http://code.google.com/p/cryptsetup/...AskedQuestions

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 02:12 AM

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

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

Code:

kernel/drivers/hwmon/dme1737.ko
kernel/drivers/md/dm-mod.ko
kernel/drivers/md/dm-crypt.ko
kernel/drivers/md/dm-delay.ko
kernel/drivers/md/dm-multipath.ko
kernel/drivers/md/dm-round-robin.ko
kernel/drivers/md/dm-queue-length.ko
kernel/drivers/md/dm-service-time.ko
kernel/drivers/md/dm-snapshot.ko
kernel/drivers/md/dm-mirror.ko
kernel/drivers/md/dm-log.ko
kernel/drivers/md/dm-region-hash.ko
kernel/drivers/md/dm-log-userspace.ko
kernel/drivers/md/dm-zero.ko

So it does seem to be loaded!

Steviepower 04-06-2012 03: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:
Quote:

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 06:35 PM

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

Steviepower 04-17-2012 11:50 PM

all I get is:
Quote:

[22433716.203107] dm_mod: Unknown symbol scsi_verify_blk_ioctl

H_TeXMeX_H 04-18-2012 02: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 11:58 AM.