Mailinglist Archive: opensuse (1047 mails)

< Previous Next >
SOLVED Re: [opensuse] Bootup of Luks partitions not waiting long for Password
On 01/25/2016 04:23 AM, Carlos E. R. wrote:
Mounting the same partitions manually with something like:
systemctl start systemd-cryptsetup@cr_home.service
it will wait for the duration specified in crypptab.
Then the code in the initrd comes from somewhere else.

More specifically, I don't think anything in initrd is involved.
I suspect, as you indicated up-thread, that it has root mounted
by that point, and is working out of the actual /etc directory.




The last tests I will do on this, tomorrow, is to remove "nofail"
on these partitions in the fstab.

But realistically, I don't want it to fail, I just want it to wait
a few seconds longer.

What "nofail" does is not to abort the boot process if the mounting
fails. Just ignore that partition and continue. In your case, it should
go to emergency mode.


We have found the guilty party here, it is systemd ignoring /etc/cryptab
when Nofail appears in /etc/fstab.
(And this explains why Andrei's tests did not show this problem)


When I replaced "nofail" with "defaults" in fstab, the boot-time prompt
(either text mode or plymouth's graphical mode) will wait the _full 15 seconds_
that I specified in /etc/crypttab for the passphrase for LUKS encrypted
partition.

If I enter nothing, it drops to emergency mode, indicates that a password is
needed, and asks what to do. If I select continue, it jumps right back and
asks for the password again. If I give it the password it boots fine
and mounts both LUKS partitions.

With nofail in place in fstab, it simply times out after the 5 seconds, and
boots
without waiting for, or mounting, the LUKS partitions, and the timeout
parameter in /etc/crypttab is ignored.

The problem appears to be that systemd is not aware of /etc/crypttab

_SOLUTION:_ ----------------------------------------

Systemd (at least as implimented in opensuse 13.2) is ignoring the wait time
in /etc/crypttab

Yast, seems to set up LUKS partitions with nofail (and has done so for several
releases),
and, quite frankly, this is what I want in my case.

Workaround: In /etc/fstab, add a parameter to the options to explicitly tell
systemd
to wait your desired interval. x-systemd.device-timeout=15 does this.

Example fstab line:
/dev/mapper/cr_myprivate /myprivate xfs nofail,x-systemd.device-timeout=15
= 0 2

This causes systemd to wait 15 seconds after displaying the password request
before
booting with the partitions left un mounted.


Thanks to Carlos and Andrei Borzenkov for their hints and testing.

Against WHAT should I file the bug report?








--
After all is said and done, more is said than done.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >