crypto disk passphrase can't be entered

Bug #464292 reported by Christian Mertes
This bug report is a duplicate of:  Bug #454898: cryptsetup starts too early. Edit Remove
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: mountall

I upgraded from Jaunty to Karmic yesterday which made my system unbootable. I have an encrypted swap and home partition. The swap mounts just fine as an early crypto disk. For the home I get a passphrase prompt but when typing it in and pressing enter nothing happens. When I press enter a second time I get a "bad passphrase" message and a new prompt. Each time I type anything before pressing enter, the enter key just seems to be ignored, no matter how many times I try. Pressing enter without typing before works but of course to little use. I do get into the emergency shell but I can't type there either. The only thing that seems to work there is Ctrl-C. I'll attach a screen shot of how it looks.

I use the non-graphic boot because Jaunty used to show my passphrase in clear text when I didn't. I'd try the graphical boot if anyone could tell me how to reactivate it in Karmic.

I noticed there are many similar bugs like this one but not for the final AFAICS.

Revision history for this message
Christian Mertes (cmertes) wrote :
Revision history for this message
Christian Mertes (cmertes) wrote :

Commenting out the /home entries in /etc/fstab and /etc/crypttab with a Live CD and manually mounting on the command line just before login is a workaround.

Revision history for this message
Pedro Soria-Rodriguez (pedrosoriarodriguez) wrote :

Christian, how did you get it to even ask you for the password to the encrypted filesystem?

In my system (fresh 9.10 install), the graphical boot screen just says "Waiting for /dev/mapper/cryptohome", but there's not way to enter the password.

My /etc/fstab contains:
/dev/mapper/cryptohome /home ext3 relatime,errors=remount-ro,bootwait 0 2

My /etc/crypttab contains:
cryptohome /dev/sda4 noauto luks

If I press "ESC", I get a console, but it only allows me to enter the root password to get a shell.... but, of course, by default there is no root login allowed, so that's no help.

So, I have to rebook with the LiveCD, comment out the /dev/mapper/cryptohome entry in fstab, and.... here I am, looking for a solution.

Revision history for this message
Christian Mertes (cmertes) wrote :

My fstab entry sais
/dev/mapper/home /home ext3 defaults,noatime,errors=remount-ro 0 1
and my crypttab
home /dev/sda6 none luks,retry=1,cypher=aes-cbc-essiv:sha256

I don't know what your bootwait option does, have you tried it without? Not that I can say that your behaviour is better than mine. If you'd allow root login you'd at least get a shell where you can type ;)

Revision history for this message
carloslp (carloslp) wrote :

Hello

I am having the same error.

Upgrade from jaunty to karmic and now I can't type the password for mounting /home. The system ask for it but i can't enter it.

I must press esc to get a root shell and mount manually

/etc/init.d/cryptdisks start
mount /home
exit

and then the system continues booting...

I am wondering how to fix this issue. any idea?

Revision history for this message
Luke (lukekuhn) wrote :

  This works on my systems. They have /home and swap as partitions on a LVM volume, in turn on a LUKS partition, and the key is this: You must (whether you ever hibernate or not) specify RESUME=UUID=(UUID of swap partition), then update-initramfs -u . Now, the passphrase is called in the initramfs, NOT echoed to a console under the splash screen, works fine splash or no.

To work without a resume image specified is possible but very buggy, and your problems do not suprise me. What happens is this: Cryptsetup is called by /etc/init/cryptdisks-enable.conf if you are using the current (karmic) build of cryptsetup. Cryptsetup now calls for the passphrase-but it is not the only program running! Always after the first call another program will echo text to the console, making passphrase entry impossible. The second try, however, generally works in my tests(your results may differ!) as other programs are now waiting instead of echoing their own messages. Same with or without splash-except, of course, for the echo-to-console under the splash screen bug, which is still there.

With LVM, one passphrase call handles the entire volume group, and is called in the initramfs, same as before. Without this arrangement, encryption becomes a real bugfest as of now. Cryptsetup in init needs to have a console to itself(all other outputs suppressed)-or else be modified to call everything in /etc/crypttab during the initramfs, whether needed for a resume image or not. It has not really been ported very well to upstart, it seems.

Revision history for this message
Christian Mertes (cmertes) wrote :

Thanks for the hint, Luke. Unfortunately, I don't have an LVM volume for swap and home but rather two separate LUKS partitions. Your solution sounds better in any case, as it annoys the hell out of me to enter the same passphrase twice. Why didn't the Jaunty installer propose this solution to me instead of the other? Anyway, is there still a way to mount /home as a so called "early crypto disk"? Or can I tell upstart not to run anything in parallel to mountall.sh or cryptsetup or whatever?

affects: mountall (Ubuntu) → cryptsetup (Ubuntu)
Revision history for this message
carloslp (carloslp) wrote :

Luke your solution works. I have edited /etc/initramfs-tools/conf.d/resume and put the line
RESUME=/dev/mapper/my-home-encrypted
and then update-initramfs -u and now everything works ok.

But i think that this is not the correct solution because resume partition must be swap (i think) not home. And if I put swap it will not ask for the key because my swap partition is random encrypted.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.