You are not logged in.
I have three LUKS partitions on a hard drive (root, home, and swap) where the second two are controlled through /etc/crypttab. Boot fails on fsck because the home partition has not been mounted; if I change the crypttab entry from the password to "ASK" I am prompted for the password prior to fsck and the system boots fine. I obviously don't want to have to enter three passwords on boot, so I want the correct entries in crypttab.
What am I doing incorrectly?
Last edited by joshdmiller (2011-08-12 20:08:22)
Offline
Maybe you provided incorrect passwords. Or did you use accented characters?
Offline
Maybe you provided incorrect passwords. Or did you use accented characters?
LOL. No, the password is correct and there are no accented characters, but there are plenty of symbols and it is 32 characters long. I tried with quotes and without.
Offline
We have to rule out the most evident possibilities. It's always my first step
Well, with all those symbols it can be an encoding problem, don't you think?
Offline
We have to rule out the most evident possibilities. It's always my first step
Indeed!
Well, with all those symbols it can be an encoding problem, don't you think?
They are standard symbols and follow the rules of bash quoting. As there is an asterisk, I tried single quotes as well but with no success. In either event, it always works when prompted.
Offline
Since LUKS provides the management of multiple password why don't you add one more simple key without any fancy character? Just to be sure that this isn't about your password. And other than that I can't think of anything else
Offline
Since LUKS provides the management of multiple password why don't you add one more simple key without any fancy character? Just to be sure that this isn't about your password. And other than that I can't think of anything else
I do not have any extra hard disks and the partition is in use, so I just reformatted my swap partition as a test with a simple "password", which worked flawlessly. So the problem is obviously the characters in the password. Thanks your help.
After further manual investigation (running read_crypttab from rc.sysinit) it appears that passwords cannot contain hash marks or the remaining part of the line is considered a comment - I think this is due to the use of eval in read_crypttab - and bash complains about an unexpected EOF due to a missing matching double quote. That is
swap /dev/sda2 "password#hash"
is evalled as
swap /dev/sda2 "password
which obviously can't work. But the double-quotes should take care of this; the top of the crypttab file says "to use special characters, surround it by quotes, the usual bash quoting rules apply".
And wouldn't you know it - I found a corresponding bug report. And the patch does fix the issue. Wonder why this hasn't been fixed yet...
Offline