You are not logged in.

#1 2007-04-12 11:41:01

rbl
Member
Registered: 2005-08-29
Posts: 64

[solved] LUKS occasionally won't mount partitions

Hello guys,

Not sure if I posted to the right forum this time, I really hope this is not a hardware problem..

Since about a month or so, my machine doesn't always mount my LUKS partitions correctly. I have
/root, /swap and /home partitions who are mounted in this order, the last two via crypttab. /root has always mounted correctly so far. /swap fails to mount quite often, and /home mounts correctly most of the time.

Error message: "Cannot read from key storage" or the like. key storage is defined via crypttab, being two files in /etc (which, obviously, belongs to the /root partition which is mounted first and always correctly).

So.. what do you assume? Hardware problem? Udev changes?

Thanks in advance for any suggestions!

Last edited by rbl (2007-06-26 12:07:42)

Offline

#2 2007-04-26 15:58:36

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [solved] LUKS occasionally won't mount partitions

*bump* for great justice, the problem is occurring even more frequently now. Please help.

Offline

#3 2007-05-15 05:51:42

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: [solved] LUKS occasionally won't mount partitions

What you say!  Is this still an issue for you?  I was thinking about using luks, but I may have to make my time.

Last edited by Convergence (2007-05-15 05:55:03)


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#4 2007-05-15 06:15:42

mod24
Member
Registered: 2006-11-25
Posts: 20

Re: [solved] LUKS occasionally won't mount partitions

Hi rbl,

I have exactly the same problem here. Since about one month my full encrypted system has sporadically problems when it comes to mount the  swap and home partition. The root partition indeed always is decrypted. The error message is the same like the one rbl posted.

Any help or suggestions would be greatly appreciated.

Thanks in advance,
Michael

Offline

#5 2007-05-16 07:27:10

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: [solved] LUKS occasionally won't mount partitions

mod24 wrote:

I have exactly the same problem here. Since about one month my full encrypted system has sporadically problems when it comes to mount the  swap and home partition. The root partition indeed always is decrypted. The error message is the same like the one rbl posted.

I've got the same problem here. And even after the boot process decrypting the additional partition(s) succeeds only random. This is what I get sometimes after booting without successful decryption of my additional partition and then trying it manually:

# cryptsetup luksOpen /dev/sda6 wad0 --key-file /etc/wad0.key
Failed to setup dm-crypt key mapping.
Check kernel for support for the serpent-cbc-essiv:sha256 cipher spec and verify that /dev/sda6 contains at least 514 sectors.
Failed to read from key storage
Command failed: No key available with this passphrase.

# cryptsetup luksOpen /dev/sda6 wad0 --key-file /etc/wad0.key
key slot 1 unlocked.

What is particular strange is that the first manual decryption fails and the second one succeeds. But there have also been times were cryptsetup failed up twice in a row and succeeded by the third time. And sometimes it doesn't fail at all...

I've checked with lsmod that dm-crypt, sha256, serpent and aes are loaded before I've tried to decrypt my additional partition. But that's pretty obvious that these modules had to be successfully loaded before because otherwise the root partition couldn't have been successfully decrypted on boot.

BTW I'm running Arch64.


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#6 2007-05-17 08:56:59

mod24
Member
Registered: 2006-11-25
Posts: 20

Re: [solved] LUKS occasionally won't mount partitions

Hi,

I forgot to mention that I'm on Arch64, too. And I can confirm the beahviour that g_syme described. The whole decrypting worked fine from November 2006 till april 2007. But somwhere around the middle of april it stoped working (I can not say exactly when, as I don't reboot my pc too often).

Any help would be really appreciated.

Kind Regards
Michael

Offline

#7 2007-06-01 16:43:29

itti
Member
Registered: 2007-06-01
Posts: 77

Re: [solved] LUKS occasionally won't mount partitions

Hi,

I have the same issues and I'm on arch64 too...

Offline

#8 2007-06-11 10:31:49

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [solved] LUKS occasionally won't mount partitions

Hey guys,

unsurprisingly, my affected box also runs Arch64. Maybe one of the Arch64 devs could look into it, if a mod could move this thread to the Arch64 forum.
Until it is resolved.. maybe we could find a workaround that just retries mounting the LUKS partitions on fail?

Offline

#9 2007-06-13 16:28:08

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [solved] LUKS occasionally won't mount partitions

I have this problem on both arch32 and arch64. So far I have no idea why this happens.

The more often in a short period you execute a luksOpen or luksAddKey (and maybe other) command, the more often it fails. For example, my first two volumes always open cleanly, my third sometimes fails and sometimes doesn't. It also happens when you do it manually, just to luksOpen->luksClose->luksOpen->.... and in the third or fourth attempt it is likely to fail.

A friend of mine has 4 or 5 LUKS volumes on his machine and he can never open them all at boot time without a failure. I anyone has any idea on what causes this, I'd be glad to fix it. I also posted on the dm-crypt mailing list, no answers so far (http://article.gmane.org/gmane.linux.ke … crypt/2230). If anyone knows a case where any non-arch user has this problem, I'd like to know, too.

Offline

#10 2007-06-13 20:53:48

KerowynM
Member
Registered: 2006-06-04
Posts: 78

Re: [solved] LUKS occasionally won't mount partitions

I tried to move to a LUKS encrypted system and had similar issues.  When creating the partitions and trying to mount them I got the same errors as above.  When trying to boot into the LUKS root partition the system just hung immediately after asking me for the password.

I just reformated the partitions and went back to unencrypted, but I would certainly like to get it working.

Offline

#11 2007-06-21 16:39:39

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [solved] LUKS occasionally won't mount partitions

I may have the fix for the problem, please stay tuned :)

EDIT: Fixed and uploaded for both architectures! Please wait for your mirror to sync and enjoy!

Last edited by brain0 (2007-06-21 17:14:49)

Offline

#12 2007-06-26 09:07:19

rbl
Member
Registered: 2005-08-29
Posts: 64

Re: [solved] LUKS occasionally won't mount partitions

Thanks a LOT! Works great again so far. Very good job! So it wasn't an Arch64 specific problem after all?

Anyway, brain0:
youremyheropatriotic.jpg

Offline

Board footer

Powered by FluxBB