Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dm-crypt luksOpen device problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Atle
Apprentice
Apprentice


Joined: 16 Sep 2004
Posts: 179

PostPosted: Thu Aug 09, 2012 6:37 am    Post subject: dm-crypt luksOpen device problems Reply with quote

I set up dmcrypt some time ago, but have not used in regularly. I tried "opening" my partion now, but not sure whether I'm doing something wrong, or something is wrong with my system. I don't really know what I'm doing.

From fstab I have this line:
/dev/mapper/stackback /mnt/stackback ext4 noauto,noatime 0 1

And I know the physical disk is /dev/sdb1.

This is what's in dev/mapper when I start:
Code:

# ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 236 Aug  9 07:32 control
lrwxrwxrwx 1 root root       7 Aug  9 07:32 sdb1 -> ../dm-0


So i try:
Code:

# cryptsetup luksOpen /dev/sdb1 stackback
Enter passphrase for /dev/sdb1:
device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/sdb1.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).
Failed to read from key storage.


Checking /proc/crypto
Code:


# cat /proc/crypto | grep aes
name         : ecb(aes)
driver       : ecb(aes-asm)
name         : cbc(aes)
driver       : cbc(aes-asm)
name         : cbc(aes)
driver       : cbc(aes-asm)
name         : aes
driver       : aes-asm
module       : aes_x86_64
name         : aes
driver       : aes-generic
module       : aes_generic


Anything obviously wrong this far?
I'm only 90% sure about my password, it's a long time since i set this up, and I don't write passwords down. But this doesn't look like a password issue.
Back to top
View user's profile Send private message
Atle
Apprentice
Apprentice


Joined: 16 Sep 2004
Posts: 179

PostPosted: Thu Aug 09, 2012 6:43 am    Post subject: Reply with quote

dmesg:
Code:

device-mapper: table: 253:1: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
Back to top
View user's profile Send private message
Skymotz
n00b
n00b


Joined: 09 Sep 2006
Posts: 36

PostPosted: Thu Aug 09, 2012 7:46 am    Post subject: Reply with quote

maybe it's not the aes that's missing but the sha256...
Code:

cat /usr/src/linux/.config | grep SHA

could be interesting
Back to top
View user's profile Send private message
Atle
Apprentice
Apprentice


Joined: 16 Sep 2004
Posts: 179

PostPosted: Thu Aug 09, 2012 7:55 am    Post subject: Reply with quote

Code:

# grep SHA .config
CONFIG_SCTP_HMAC_SHA1=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
tin linux # lsmod | grep sha
tin linux #
Back to top
View user's profile Send private message
Skymotz
n00b
n00b


Joined: 09 Sep 2006
Posts: 36

PostPosted: Thu Aug 09, 2012 8:04 am    Post subject: Reply with quote

seems for some reason sha256 module doesn't get loaded automagically
Code:

modprobe sha256_generic
lsmod
# try to mount again

if that doesn't work, maybe look at aes: maybe it's also a module that doesn't get loaded?
Back to top
View user's profile Send private message
Atle
Apprentice
Apprentice


Joined: 16 Sep 2004
Posts: 179

PostPosted: Thu Aug 09, 2012 8:42 am    Post subject: Reply with quote

Modprobe works, but I get the same error when I use luksOpen.
Back to top
View user's profile Send private message
Skymotz
n00b
n00b


Joined: 09 Sep 2006
Posts: 36

PostPosted: Thu Aug 09, 2012 9:04 am    Post subject: Reply with quote

hmmm
what does
Code:

cryptsetup isLuks /dev/sdb1

say?
Back to top
View user's profile Send private message
Atle
Apprentice
Apprentice


Joined: 16 Sep 2004
Posts: 179

PostPosted: Thu Aug 09, 2012 10:33 am    Post subject: Reply with quote

Hello again,

I've been able to mount the partition using a live CD. So the problem is something with my system. The strange thing is that I don't think I've upgraded anything since the last time it worked.

However, that is also the reason I will replace gentoo with a simpler to administrate distro on this machine. I just don't have the time. So the problem, if not solved, is no longer necessary to solve. I got to the content, and that was all I needed to do at this time.

But thanks for the suggestions.
Back to top
View user's profile Send private message
Skymotz
n00b
n00b


Joined: 09 Sep 2006
Posts: 36

PostPosted: Thu Aug 09, 2012 10:36 am    Post subject: Reply with quote

well, I tried that once and went to debian which I used before gentoo ... came back crawling after a short time because I only where to configure stuff under gentoo. if you just don't have the time to compile, try sabayon.
good luck!
Back to top
View user's profile Send private message
Atle
Apprentice
Apprentice


Joined: 16 Sep 2004
Posts: 179

PostPosted: Thu Aug 09, 2012 10:53 am    Post subject: Reply with quote

I love gentoo, and will keep using it at home. But for my computer at work, I've found that I don't have the necessary time to give it the love it deserves.

I've had the same experience as you earlier, and never found a distro I was comfortable with, and always returned to gentoo. But after trying a few, I have found one that works well for me, and doesn't have too many custom solutions that makes custom configuration and problem solving too difficult.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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