| View previous topic :: View next topic |
| Author |
Message |
Atle Apprentice

Joined: 16 Sep 2004 Posts: 179
|
Posted: Thu Aug 09, 2012 6:37 am Post subject: dm-crypt luksOpen device problems |
|
|
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 |
|
 |
Atle Apprentice

Joined: 16 Sep 2004 Posts: 179
|
Posted: Thu Aug 09, 2012 6:43 am Post subject: |
|
|
dmesg:
| Code: |
device-mapper: table: 253:1: crypt: Device lookup failed
device-mapper: ioctl: error adding target to table
|
|
|
| Back to top |
|
 |
Skymotz n00b

Joined: 09 Sep 2006 Posts: 36
|
Posted: Thu Aug 09, 2012 7:46 am Post subject: |
|
|
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 |
|
 |
Atle Apprentice

Joined: 16 Sep 2004 Posts: 179
|
Posted: Thu Aug 09, 2012 7:55 am Post subject: |
|
|
| 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 |
|
 |
Skymotz n00b

Joined: 09 Sep 2006 Posts: 36
|
Posted: Thu Aug 09, 2012 8:04 am Post subject: |
|
|
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 |
|
 |
Atle Apprentice

Joined: 16 Sep 2004 Posts: 179
|
Posted: Thu Aug 09, 2012 8:42 am Post subject: |
|
|
| Modprobe works, but I get the same error when I use luksOpen. |
|
| Back to top |
|
 |
Skymotz n00b

Joined: 09 Sep 2006 Posts: 36
|
Posted: Thu Aug 09, 2012 9:04 am Post subject: |
|
|
hmmm
what does
| Code: |
cryptsetup isLuks /dev/sdb1
|
say? |
|
| Back to top |
|
 |
Atle Apprentice

Joined: 16 Sep 2004 Posts: 179
|
Posted: Thu Aug 09, 2012 10:33 am Post subject: |
|
|
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 |
|
 |
Skymotz n00b

Joined: 09 Sep 2006 Posts: 36
|
Posted: Thu Aug 09, 2012 10:36 am Post subject: |
|
|
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 |
|
 |
Atle Apprentice

Joined: 16 Sep 2004 Posts: 179
|
Posted: Thu Aug 09, 2012 10:53 am Post subject: |
|
|
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 |
|
 |
|