LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   cryptsetup and device-mapper problem (http://www.linuxquestions.org/questions/linux-software-2/cryptsetup-and-device-mapper-problem-535683/)

avallach 03-08-2007 10:09 AM

cryptsetup and device-mapper problem
 
Hello.
When I try to reach my encrypted partition by cryptsetup (cryptsetup create SEC2 /dev/hda5 )
I have the following problem:

Code:

Command failed: device-mapper: reload ioctl failed: Bad argument
# dmesg | tail
device-mapper: table: 254:0: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
device-mapper: ioctl: device doesn't appear to be in the dev hash table.

Any ideas ?

nx5000 03-08-2007 10:19 AM

Seems to be a known problem:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=395414

What says
modprobe -v dm-crypt

If its linked in the kernel, its a different story..

nx5000 03-08-2007 10:22 AM

Did you add dm-crypt module yourself? Like you build it with module-assistant or is it the dm-crypt module from debian?

avallach 03-08-2007 11:44 AM

actually it's Arch ;-) and yes dm_crypt is loaded. So it's rather a bug :/
hope they'll do something with it soon..

oh... almost forgot, when using Debian Etch I can easily access my data :) there is cryptsetup 1.0.5 (I wonder why it isn't on official cryptsetup page ) in Etch, so maybe after upgrading my cryptsetup this problem will be solved...

nx5000 03-08-2007 12:24 PM

Quote:

Originally Posted by avallach
actually it's Arch ;-)

Ah yeah I always forget there's something else than debian ;)
Quote:

and yes dm_crypt is loaded. So it's rather a bug :/
Yes but where is the question!
Quote:

hope they'll do something with it soon..
They won't if they are not aware of it. The page that I showed you says it was corrected by a kernel upgrade. Looking quickly at kernel changelog, I haven't seen the change.
You do run the _latest_ 2.6.x ? Like 2.6.18.4 or 2.6.x.latest
Quote:

oh... almost forgot, when using Debian Etch I can easily access my data :) there is cryptsetup 1.0.5 (I wonder why it isn't on official cryptsetup page ) in Etch, so maybe after upgrading my cryptsetup this problem will be solved...
1.0.5 doesn't exist ?? see here:
http://packages.debian.org/cgi-bin/s...ll&release=all
which is based on upstream cryptsetup version:
http://packages.debian.org/changelog...26-1/changelog
http://bugs.debian.org/cgi-bin/versi...%3A1.0.4~rc2-1
My method would be to upgrade first the kernel (in case you don't have the latests) because running a buggy kernel is never perfect.
And then maybe cryptsetup needs to be updated for compatibility with the newer dm_crypt or dm_mapper.

ioctl are a way to communicate to the kernel module. It looks like the cryptsetup is not compatible with the kernel (bad argument).

When you get the same Device Mapper (kernel in fact) and cryptsetup versions then it should work the same..

avallach 03-08-2007 12:38 PM

I am using 2.6.20 kernel on arch and 2.6.18 on Debian... So I suppose it's not a kernel problem here, I could try downgrading this 2.6.20 to be the same version as on Debian or just wait cryptsetup version working with the latest kernels

This 1.0.5 version wasn't officialy released, so it's rather still in development


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