Bug 703947

Summary: systemd: cryptsetup passphrase prompt times out too quickly
Product: [openSUSE] openSUSE 12.1 Reporter: Stefan Seyfried <seife>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aj, fcrozat, hendrikw, lnussel
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Third Party Developer/Partner Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 696902    

Description Stefan Seyfried 2011-07-05 14:49:54 UTC
susi:~ # /etc/init.d/boot.crypto start
Failed to issue method call: Unit boot.crypto.service failed to load: No such file or directory. See system logs and 'systemctl status' for details.

susi:~ # systemctl start crypto.service
Failed to issue method call: Unit crypto.service is masked.

(no idea if that would have helped)

This leaves me unable to login after boot.

The issue is worsened by the fact that there is no way to use the old boot.crypto without editing /etc/rc.status to not call systemctl. Maybe a "--no-systemd" switch which is parsed by rc.status would be helpful?
Comment 1 Stefan Seyfried 2011-07-05 14:50:54 UTC
susi:~ # cat /etc/crypttab
/etc/crypttab
susi:~ # cat /etc/crypttab
cr_sda7         /dev/disk/by-id/ata-WDC_WD2500BEVS-08VAT2_WD-WX20AC9U2733-part7 none       none
susi:~ # grep cr_ /etc/fstab
/dev/mapper/cr_sda7 /home             ext3    noatime,acl,user_xattr,nofail 0 0
susi:~ # chkconfig boot.crypto
boot.crypto  on
Comment 2 Andreas Jaeger 2011-07-05 15:08:46 UTC
boot.crypto is not called at all which is correct AFAIK. Instead systemd has its own crypt handling for mounting.

Seife, please check cryptsetup.target, e.g.:

systemctl status cryptsetup.target
Comment 3 Stefan Seyfried 2011-07-05 15:13:28 UTC
note: this worked until today's update to FACTORY

susi:~ # rpm -qa --last|grep systemd
systemd-29-4.1                    Sat Jul  2 14:19:13 2011

systemd was not touched by this update! so it might be some side effect of another package.


I did already play around with systemctl, so this might no longer be totally correct. I'll retry after next boot:

susi:~ # systemctl status cryptsetup.target
cryptsetup.target - Encrypted Volumes
   Loaded: loaded (/lib/systemd/system/cryptsetup.target)
   Active: inactive (dead) since Tue, 05 Jul 2011 16:47:53 +0200; 22min ago

susi:~ # systemctl|grep crypt
cryptset...r_sda7.service loaded active exited Cryptography Setup for cr_sda7
susi:~ # systemctl status cryptset...r_sda7.service
cryptset...r_sda7.service
   Loaded: error
   Active: inactive (dead)
Comment 4 Frederic Crozat 2011-07-05 15:19:33 UTC
check /var/log/messages for error in mount of crypto volume by systemd.
Comment 5 Stefan Seyfried 2011-07-05 19:03:00 UTC
Ok, rebooted to test.
crypto.service runs, but the passphrase input times out very fast (~5 seconds?), then the X server starts, the boot console gets cleared and you never see that passphrase prompt again.

Starting it afterwards is not easy:
susi:~ # systemctl status crypto.service
crypto.service
          Loaded: masked (/dev/null)
          Active: inactive (dead)

Warning: Unit file changed on disk, 'systemctl --system daemon-reload' recommended.
susi:~ # systemctl start crypto.service
Failed to issue method call: Unit crypto.service is masked.
susi:~ # systemctl start crypto.service
Failed to issue method call: Unit crypto.service is masked.

So I finally did 
systemctl restart cryptsetup.target # not sure if that was necessary
systemctl --system daemon-reload
systemctl restart crypto.service

And finally got my passphrase prompt.

Maybe a allowing "/etc/init.d/boot.crypto start" to also work would be helpful for users in panic mode (as I was ;-)

And the timeout is too short. I mean - continuing to boot makes absolutely no sense without $HOME mounted, so the "speed" argument is not valid ;-)
Comment 6 Frederic Crozat 2011-08-12 12:08:44 UTC
closing as fixed in systemd in Base:System and Factory.