Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
failed to setup dm-crypt key mapping
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dermund
Apprentice
Apprentice


Joined: 28 Aug 2007
Posts: 205
Location: Sprawl

PostPosted: Tue Jun 03, 2008 6:43 am    Post subject: failed to setup dm-crypt key mapping Reply with quote

Hi

I've got a problem with cryptsetup.
I've formatted a harddisk on a archlinux-system with "cryptsetup luksFormat -y -c 384 -s lrw-benbi" ..or something like that. And on that system I could "luksOpen" it without any problems.
I've put this harddisk onto my gentoo system, emerged cryptsetup - and now I can't luksOpen it anymore.
"cryptsetup luksOpen --key-file /var.key" fails with:
Code:

 Failed to setup dm-crypt mapping.
Failed to read from key storage
Command failed: No key available with this passphrase.

The same as in FAQ dm-crypt wiki www.saout.de/tikiwiki/tiki-index.php?page=LUKSFaq.
But I've controlled everything they say in there.
I have kernel 2.6.22-gentoo. I have loaded the same modules as on the old system.
On the archlinux I have some 2.6.24 kernel. Hmm...? Any ideas?


Last edited by dermund on Tue Jun 03, 2008 4:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Tue Jun 03, 2008 3:22 pm    Post subject: Reply with quote

Moved from Portage & Programming to Kernel & Hardware, and the other one to the Dustbin. Please don't post the same question in more than one place - it makes it harder for anyone else who comes along later with the same problem to find the answer.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
dermund
Apprentice
Apprentice


Joined: 28 Aug 2007
Posts: 205
Location: Sprawl

PostPosted: Tue Jun 03, 2008 4:01 pm    Post subject: Reply with quote

sry for double post.
My call and error: (same is when I try to do luksFormat an other partition)
Code:

molari ~ # cryptsetup luksOpen /dev/hdc6 hdc 6 --key-file /var.key
Failed to setup dm-crypt key mapping.
Check kernel for support for the aes-lrw-benbi cipher spec and verify that /dev/hdc6 contains at least 383 sectors.
Failed to read from key storage
Command failed: No key available with this passphrase.


Here's some information that might be useful. Maybe there is still a module missing??
Code:

molari ~ # lsmod
Module                  Size  Used by
aes_i586               33280  0
lrw                     3328  0
blkcipher               5508  1 lrw
dm_crypt               10628  0
dm_mod                 42560  1 dm_crypt
sha256_generic         11008  0
crypto_algapi          11648  4 aes_i586,lrw,blkcipher,sha256_generic
usb_storage            44032  1
ipt_MASQUERADE          2688  1
iptable_nat             5508  1
nf_nat                 13996  2 ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4       7044  2 iptable_nat
nf_conntrack           42900  4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4
iptable_filter          2304  0
ip_tables               9032  2 iptable_nat,iptable_filter
x_tables               10116  3 ipt_MASQUERADE,iptable_nat,ip_tables
gf128mul                7168  1 lrw
via_agp                 7936  1
ehci_hcd               37132  0
uhci_hcd               27536  0
via                    35072  0
drm                    63124  1 via
agpgart                24752  2 via_agp,drm


molari ~ # dmsetup targets
crypt            v1.5.0
striped          v1.0.2
linear           v1.0.2
error            v1.0.1


molari ~ # ls -lah /dev/mapper/
total 0
drwxr-xr-x  2 root root     60 Jun  3 19:32 .
drwxr-xr-x 14 root root    14K Jun  3 19:24 ..
crw-rw----  1 root root 10, 63 Jun  3 19:24 control


molari ~ # uname -a
Linux molari 2.6.24.4 #5 Tue Jun 3 18:59:22 CEST 2008 i686 VIA Samuel 2 CentaurHauls GNU/Linux


molari ~ # cat /proc/crypto
name         : aes
driver       : aes-i586
module       : aes_i586
priority     : 200
refcnt       : 1
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

name         : sha256
driver       : sha256-generic
module       : sha256_generic
priority     : 0
refcnt       : 1
type         : digest
blocksize    : 64
digestsize   : 32




Shouldn't the lrw decryption show up in the last part of listing?
Does someone have a clue about all that?
Back to top
View user's profile Send private message
dermund
Apprentice
Apprentice


Joined: 28 Aug 2007
Posts: 205
Location: Sprawl

PostPosted: Fri Jun 06, 2008 6:41 am    Post subject: Reply with quote

Somehow it runs now! I've just built a new kernel, but I changed afaik nothing dramatically. But for example the crypto_algapi module is no longer loaded.
Hmm, still have no clue.
Maybe it got to do, with the modules loaded...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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