Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cannot initialize device-mapper.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Rainer06
n00b
n00b


Joined: 25 Mar 2006
Posts: 13
Location: Nuremberg

PostPosted: Sun Apr 28, 2013 6:50 pm    Post subject: [SOLVED] Cannot initialize device-mapper. Reply with quote

I have updated my Gentoo installation for the first time after several months, and now I cannot read my encrypted Raid array any more.

When I am trying to access the Raid array with

Code:

cryptsetup luksOpen /dev/md1 raid


I am getting the following error message:

Code:

Cannot initialize device-mapper. Is dm_mod kernel module loaded?


I have tried to downgrade the version of cryptsetup, compiled a new kernel version, downgraded the version of udev, downgraded the version of lvm2,
but nothing was resolving the error. I am getting a little desperate now....

Let me try to provide some more background information:

1) The kernel configuration has not changed, and it was working previously with the kernel that is used.
In particular, device mapper is compiled into the kernel and available.
In /proc/misc, there is an entry "236 device-mapper".

2) The node /dev/md1 is visible.

3) The problem is with the device mapper itself.
Commands such as

Code:

cryptsetup luksDump -v /dev/md1


are successful.

4) dmraid is not installed. Maybe this has been uninstalled with the update?
However, after an emerge of dmraid, the problem persists.

5)
Code:
 dmsetup targets
returns

Code:

crypt            v1.12.1
striped          v1.5.1
linear           v1.2.1
error            v1.1.0


6) device mapper from lvm2 is started:

Code:

# /etc/init.d/device-mapper status
 * status: started
# /etc/init.d/dmeventd status
 * status: started


Do you have any idea what I could do?
Maybe I could compile a new kernel with a device mapper module dm_mod and load that module.
But I am a little hesitant to do so because I think that this is not the problem, the
device mapper compiled into the kernel was working previously.


Last edited by Rainer06 on Mon Apr 29, 2013 5:07 am; edited 3 times in total
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2185

PostPosted: Sun Apr 28, 2013 7:40 pm    Post subject: Reply with quote

Rainer06 ...

somewhat of a guess really, but did you perhaps also update udev during this update?

>=udev-197 had a soname change, so perhaps your cryptsetup is linked to an older library:

Code:
# ldd /sbin/cryptsetup
   linux-gate.so.1 (0xb775c000)
   libcryptsetup.so.4 => /usr/lib/libcryptsetup.so.4 (0xb7730000)
   libpopt.so.0 => /usr/lib/libpopt.so.0 (0xb7724000)
   libc.so.6 => /lib/libc.so.6 (0xb759b000)
   libuuid.so.1 => /lib/libuuid.so.1 (0xb7595000)
   libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0xb7556000)
   libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb74db000)
   /lib/ld-linux.so.2 (0xb775d000)
   libudev.so.1 => /lib/libudev.so.1 (0xb749e000)
   libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb7499000)
   librt.so.1 => /lib/librt.so.1 (0xb7490000)
   libpthread.so.0 => /lib/libpthread.so.0 (0xb7475000)

A 'revdep-rebuild' should fix this ... and any other packages linked to a libudev.so.{N}.

best ... khay
Back to top
View user's profile Send private message
Rainer06
n00b
n00b


Joined: 25 Mar 2006
Posts: 13
Location: Nuremberg

PostPosted: Sun Apr 28, 2013 7:52 pm    Post subject: Reply with quote

Khay,

Thank you for the suggestion.
I have run revdep-rebuild before,
and I have emerged cryptsetup newly.
But that did not solve the problem.

Regards,
Rainer
Back to top
View user's profile Send private message
Rainer06
n00b
n00b


Joined: 25 Mar 2006
Posts: 13
Location: Nuremberg

PostPosted: Sun Apr 28, 2013 11:06 pm    Post subject: Reply with quote

I have now compiled the kernel with device mapper as a module.

Code:

modprobe dm_mod


and subsequent

Code:

cryptsetup luksOpen /dev/md1 raid


yields the same error though.
Code:

Cannot initialize device-mapper. Is dm_mod kernel module loaded?


I have no more idea what else I could do to resolve the issue.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1136

PostPosted: Sun Apr 28, 2013 11:07 pm    Post subject: Reply with quote

Newer cryptsetup has wider encryption keys by default. Current~unstable cryptsetup needs a hint to decrypt with older kind of key. Lazily I stabled this ebuild with package.accept_keywords.
_________________
fun2gen2
Back to top
View user's profile Send private message
jamatik
n00b
n00b


Joined: 20 Nov 2004
Posts: 38
Location: Berlin/Germany

PostPosted: Sun Apr 28, 2013 11:37 pm    Post subject: Reply with quote

Problem: =dev-libs/libgcrypt-1.5.2

Solution:
Code:
USE="-caps" emerge -av libgcrypt

_________________
greetings
jamatik
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1136

PostPosted: Sun Apr 28, 2013 11:47 pm    Post subject: Reply with quote

Yeah, but we are just wild guessing, because we know nothing about Rainers system :(
_________________
fun2gen2
Back to top
View user's profile Send private message
jamatik
n00b
n00b


Joined: 20 Nov 2004
Posts: 38
Location: Berlin/Germany

PostPosted: Mon Apr 29, 2013 12:06 am    Post subject: Reply with quote

@ulenrich
Maybe u r doing "wild guessing", I do not.
If u don't know the problem and not have a "not confusing answer" to rainer06, then don't post anything in first place;-).
_________________
greetings
jamatik
Back to top
View user's profile Send private message
Rainer06
n00b
n00b


Joined: 25 Mar 2006
Posts: 13
Location: Nuremberg

PostPosted: Mon Apr 29, 2013 5:04 am    Post subject: Reply with quote

Thank you very much!
Code:

USE="-caps" emerge -av libgcrypt

is resolving the problem!

There should be a big warning about this for everybody updating libgcrypt.
I just checked the emerge logs, but there is no info about this.
Please add this information for the benefit of everybody else
using encryption.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum