Bug 752260

Summary: new install with old encrypted /home partition added later does not prompt for password at boot
Product: [Fedora] Fedora Reporter: Thomas Vander Stichele <thomas>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: johannbg, lpoetter, metherid, mschmidt, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-09 13:08:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
dmesg after booting, timing out, and logging in on console
none
dmesg output after starting from the command line just the service with systemctl start dev-mapper-luks... none

Description Thomas Vander Stichele 2011-11-08 23:43:30 UTC
Description of problem:


I have a laptop which had F-15 and an encrypted /home partition.

I installed F-16 to a separate / partition, but in the installer I did not give the encryption password for the /home partition and I did not activate the /home partition in the custom partition layout (I like to try with a fresh /home first before I let the new fedora write config settings to my real /home partition).

After installing software and verifying things work, I copied the line for /home from /etc/fstab and rebooted.

I do not get asked for a prompt to type the encryption password as expected.  Instead, the boot times out after 120 seconds, failing on the dev-luks-... job for /home getting started.

I copied /etc/crypttab from the f-15 rpoot to the f16 root (which had it empty) but that doesn't solve things.

I booted with more systemd debugging, and it looks like the proper dbus invocations get made to prompt for passwords, but I don't see any prompt either in plymouth mode or in text mode.

Version-Release number of selected component (if applicable):


How reproducible:


always.

Steps to Reproduce:
1.
2.
3.
  
Actual results:

system drops me in rescue mode after 120 seconds

Expected results:

boot, ask me for encryption password, go to graphical mode and allow me to log in


Additional info:

Comment 1 Thomas Vander Stichele 2011-11-08 23:44:17 UTC
Created attachment 532427 [details]
dmesg after booting, timing out, and logging in on console

Comment 2 Thomas Vander Stichele 2011-11-08 23:45:30 UTC
Created attachment 532428 [details]
dmesg output after starting from the command line just the service with systemctl start dev-mapper-luks...

Comment 3 Thomas Vander Stichele 2011-11-09 00:22:34 UTC
After lots of experimenting, it seems that I did not have /etc/crypttab with any content.

I don't know much about luks and cryptsetup, so I will assume this file is mandatory.

However, why can't the boot figure out that asking for automounting an encrypted partition because of /etc/fstab without a corresponding line in /etc/crypttab isn't going to work ?

Comment 4 Michal Schmidt 2011-11-09 13:08:44 UTC
(In reply to comment #3)
> However, why can't the boot figure out that asking for automounting an
> encrypted partition because of /etc/fstab without a corresponding line in
> /etc/crypttab isn't going to work ?

fstab itself does not contain enough information. It does not say that it is an encrypted partition and that an action is required to activate the device. systemd cannot assume this just from the device name.