Bug 770890

Summary: plymouth does not ask for cryptohome passphrase anymore -> machine does not finish boot
Product: [openSUSE] openSUSE 12.2 Reporter: Stefan Seyfried <seife>
Component: BasesystemAssignee: Forgotten User sM9JzehKpy <forgotten_sM9JzehKpy>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P1 - Urgent CC: dheinrich, fcrozat, forgotten_sM9JzehKpy, jux, nwr10cst-oslnx, timshel, vuntz, wolfgang.hahnl, wolfgang
Version: RC 1   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: Third Party Developer/Partner Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stefan Seyfried 2012-07-11 12:17:43 UTC
After today's update on FACTORY, the machine does not finish boot.
Investigating, I did suspect problems with my crypto home partition.

Booting without "quiet", I get the usual text-mode "please enter the passphrase for cr_sda7", but booting with plymouth, I don't get a password prompt and booting never finishes (or rather, I rebooted after 2 minutes of no activity ;-)

I'm willing to provide more debugging information, but I'd need to know what is needed.

One thing I noted during the update was that systemd-plymouth (or similar) was uninstalled, but I thought it was just obsoleted by newer systemd.
Comment 1 Stefan Seyfried 2012-07-12 14:27:56 UTC
Adding Frederic, as this might remotely be related to systemd...
Comment 2 Neil Rickert 2012-07-12 18:00:47 UTC
I had the same problem, after install from the 64bit DVD (for RC1).

The machine did complete boot, after a long delay.  I believe it was timing out the hidden prompt for the encryption key.

When Yast started up to finalize the install, it mentioned that "/home" was not mounted.  I used CTRL-ALT-F2 to manually setup and mount "/home", and then I resumed Yast (CTRL-ALT-F7).

On a reboot, the same problem.  So I edited "/etc/default/grub" to remove "splash=silent quiet", I added "initrd" to the last column of "/etc/crypttab", then I ran "mkinitrd".

Booting is now noisy, but at least the crypto prompt is where I can respond to it.

I will later be installing in a system with encrypted LVM.  I will report back on whether the same problem occurs there.
Comment 3 Neil Rickert 2012-07-13 02:16:19 UTC
This works fine on a system with encrypted LVM.

Where it fails, I have luks encrypted swap and "/home".

On first boot after install, there was no visible prompt for encryption key.

After forcing crypto to "initrd", and disabling plymouth, there was a single prompt for key and both partitions were properly opened.

I switched back to using plymouth, without changing "initrd".  Now there were 3 prompts for keys (for only two partitions).

I removed the "initrd" from the last column of "/etc/crypttab", and ran "mkinitrd".  On the next boot, there was a prompt for the key for swap, but the home partition was never unlocked.

I added back the "initrd" for just the home partition, and ran "mkinitrd".  On the next boot there were 3 prompts for the two partitions.

I disabled plymouth again (removed "splash=silent quiet"), and now all is well though bootup is noisy.

I see this as a show stopper problem, so I have increased the importance rating.
Comment 5 Tim - 2012-07-14 08:54:51 UTC
I have the same issue since upgrading to 12.2 RC1.

I have only an encrypted home partition and the system just hangs during startup.

If I boot without the options "splash=silent quiet" I am asked for my pass phrase and able to boot normally.

It looks like Plymouth prevents the boot process from asking for a password.

Bnc#765130 and bnc#765214 seem to be related.
Comment 6 Forgotten User sM9JzehKpy 2012-07-14 14:19:56 UTC
Please let me know the following:

1)  Which version of plymouth is installed ? 
2)  Which plymouth theme is used ? 

Thanks
Comment 7 Tim - 2012-07-14 15:28:10 UTC
1) plymouth-0.8.5.1-1.3.1.x86_64
2) the default, the one with the glowing lights flowing around and meeting at the center

My home device is mentioned in /etc/crypttab.
Comment 8 Wolfgang Hahnl 2012-07-15 12:54:45 UTC
Today I have downloded openSUSE 12.2 RC1, I started VitualBox to install RC1. I got the first screen where you can select 
boot from hard disk ore install. As I selected installation the screen froze and finaly chose install from hard disk. Up to now I can not install RC1.
Comment 9 Forgotten User sM9JzehKpy 2012-07-15 15:52:50 UTC
@Wolfgang Hahnl:  I don't see the relationship with this issue reported with this bug ?  Did you setup a LUKS encrypted partition within Virtualbox ? If not, then we are talking about a different issue and this should be reported in a separate bug.
Comment 10 Stefan Seyfried 2012-07-16 07:59:23 UTC
Just for completeness, I reproduced this on a clean install of RC1 (Build 500) in a Virtual machine:

* use a 10GB disk image file
* boot from openSUSE-NET-Build0050-i586.iso
* select install via HTTP, language "german"
* during partitioning, keep the defaults, "separate home" partition
  * edit the home partition, select "encrypt device"
* during installation, select "XFCE desktop", remove libreoffice, java and
  some of the -lang and manuals packages to save installation time
* second part of installation already comes up (after timeout?) with a
  warning that home is not mounted
  * go into text console, issue "systemctl restart cryptsetup@cr_vda3.service"
    enter passprhase, then switch back to VT 7 to finish installation
* reboot -- no passphrase asked during plymouth boot, need to remove "quiet"
  from boot parameters to get a passphrase

so it looks like this is 100% reproducible.

This is what's in crypttab and fstab:

linux-69ba:~ # cat /etc/crypttab
cr_vda3         /dev/vda3            none       none
linux-69ba:~ # cat /etc/fstab
/dev/vda2           /                 ext4    acl,user_xattr        1 1
/dev/mapper/cr_vda3 /home             ext4    acl,user_xattr,nofail 0 2
/dev/vda1           swap              swap    defaults              0 0
proc                /proc             proc    defaults              0 0
sysfs               /sys              sysfs   noauto                0 0
debugfs             /sys/kernel/debug debugfs noauto                0 0
usbfs               /proc/bus/usb     usbfs   noauto                0 0
devpts              /dev/pts          devpts  mode=0620,gid=5       0 0

installed plymouth packages:
linux-69ba:~ # rpm -qa *ply*
libply2-0.8.5.1-1.3.1.i586
plymouth-branding-openSUSE-0.8.5.1-1.3.1.noarch
libply-splash-graphics2-0.8.5.1-1.3.1.i586
libply-boot-client2-0.8.5.1-1.3.1.i586
plymouth-plugin-label-0.8.5.1-1.3.1.i586
plymouth-scripts-0.8.5.1-1.3.1.noarch
plymouth-plugin-script-0.8.5.1-1.3.1.i586
plymouth-0.8.5.1-1.3.1.i586
libply-splash-core2-0.8.5.1-1.3.1.i586
Comment 11 Jürgen Mathwich 2012-07-16 15:51:25 UTC
I can confirm this bug - fresh install 64bit RC1
Comment 12 Vincent Untz 2012-07-18 12:57:19 UTC
For the "new install" case, I think this is because the crypto-early and crypto services are masked. At least, this is what I have here when reaching stage2 of the yast installer.
Comment 13 Vincent Untz 2012-07-18 13:40:32 UTC
Forget my last comment: Fred tells me that cryptsetup.target is what is used with systemd.
Comment 14 Frederic Crozat 2012-07-20 13:26:18 UTC
Should be fixed in http://download.opensuse.org/repositories/home:/fcrozat:/branches:/Base:/System/openSUSE_Factory/

please test
Comment 15 Jürgen Mathwich 2012-07-20 17:58:38 UTC
Hi Frederic

Awesome - works like a charm and the PW request is embedded into plymouth (which looks great btw - love it).

(Fresh VM installation with your repository as the only change to the system and /home as the only encrypted partition)

Jürgen
Comment 16 Stefan Seyfried 2012-07-20 20:16:05 UTC
Works for me, too. Don't forget to also submit to Factory in addition to 12.2 :-)
Comment 17 Neil Rickert 2012-07-20 22:30:01 UTC
That works for me, too.  But with a caveat.

I am using encrypted swap and encrypted "/home", both with the same LUKS key.

Before using your patch, I had removed "splash=silent quiet" from the boot line.  Then I had added "initrd" to the last column of "/etc/crypttab" for the "/home" entry.  That was so that I would only be asked for the encryption key once.

After applying your patch, it hung during boot.  I think that is the same bug that I had earlier reported as 765214.

I disabled splash to get booted.  Then I removed the "initrd" (changed to "none") in the crypttab entry, and ran "mkinitrd".  It then ran perfectly.

In summary - your patches seem to fix the current bug.  There still appears to be an argument between plymouth and other code (probably scripts) running from "initrd" on who should handle the crypto.
Comment 18 Tim - 2012-07-21 09:13:28 UTC
I can confirm that it does work and looks great with 12.2.  Thanks for the quick fix.
Comment 19 Wolfgang Hahnl 2012-07-21 15:26:37 UTC
(In reply to comment #9)
> @Wolfgang Hahnl:  I don't see the relationship with this issue reported with
> this bug ?  Did you setup a LUKS encrypted partition within Virtualbox ? If
> not, then we are talking about a different issue and this should be reported in
> a separate bug.

@Raymond: You are right. The problem is solved. The bug was sitting in front of the desktop: me :-))
Comment 20 Frederic Crozat 2012-07-23 08:51:40 UTC
pushed as sr 128720, will forward to Factory and 12.2
Comment 21 Bernhard Wiedemann 2012-07-23 10:00:27 UTC
This is an autogenerated message for OBS integration:
This bug (770890) was mentioned in
https://build.opensuse.org/request/show/128725 Factory / plymouth
Comment 22 Tim - 2012-07-26 15:17:57 UTC
Just for the records the issue is still not fixed in 12.2 after a dist upgrade. So please don't forget to forward the fix to 12.2.
Comment 23 Frederic Crozat 2012-07-26 15:22:25 UTC
sr #129022 done for 12.2
Comment 24 Dominik Heinrich 2012-08-07 17:01:25 UTC
This issue ist still existing in 12.2 RC2.
Comment 25 Tim - 2012-08-07 18:30:46 UTC
It is working fine for me now with all updates installed.

Are you sure that you have all updates installed? Or could it be a configuration problem - can you insert the password without the boot parameters "splash=silent quiet"?
Comment 26 Neil Rickert 2012-08-07 21:37:48 UTC
A question to Dominik (#24) - Have you seen the report for bug 774400?  Is it possible that this is what you are now experiencing?
Comment 27 Dominik Heinrich 2012-08-08 08:19:17 UTC
Ahh, please ignore my previous post! It is working now for me, too.

It seems that I run into some hardware weirdness. I installed 12.2 RC2 on an SD card, but my notebook (Lenovo x201) hangs during boot, just before the password prompt appears. Booting that SD card on my desktop computer works fine, just as using an USB stick on the Lenovo notebook.

Sorry for my overhasty post.