Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#33486 - [systemd] does not honor the "timeout=0" in /etc/crypttab

Attached to Project: Arch Linux
Opened by Zygfryd Homonto (zyghom) - Monday, 21 January 2013, 07:03 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 27 January 2013, 15:18 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: cryptsetup does not honor the "timeout=0" in /etc/crypttab
During the boot process it still waits 1m30sec and then timeout
It should wait indefinitely if timeout=0 according to cryptsetup documentation

Additional info:
* package version(s)
cryptsetup 1.5.1-1
* config and/or log files etc.
cat /etc/crypttab
# NAME SOURCE DEVICE PASSWORD OPTIONS
home /dev/sda8 - timeout=0


Steps to reproduce:
always the same
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 27 January 2013, 15:18 GMT
Reason for closing:  Not a bug
Additional comments about closing:  user configuration error.
Comment by Thomas Bächler (brain0) - Tuesday, 22 January 2013, 23:33 GMT
crypttab is not a feature of cryptsetup.
Comment by Dave Reisner (falconindy) - Tuesday, 22 January 2013, 23:38 GMT
...nor is cryptsetup used by systemd.

I assume you're mounting this device via /etc/fstab as well? You need to mark that device with x-systemd.device-timeout=0 too -- I suspect this is what's timing out, not the wait for /dev/sda8, but that's merely speculation since you've not actually posted the error.
Comment by Tom Gundersen (tomegun) - Tuesday, 22 January 2013, 23:53 GMT
I just looked through the code, and I see no reason timeout=0 should not wait indefinitely for password to be entered, even though it is not actually documented in crypttab(5). You need to set the option Dave points out as well though... If that still fails, please provide some relevant log entries.
Comment by Thomas Bächler (brain0) - Wednesday, 23 January 2013, 09:21 GMT
Tom, --timeout=0 is a cryptsetup option, but systemd doesn't use cryptsetup to prompt for a passphrase, so the option cannot be effective unless systemd explicitly parses it from crypttab.
Comment by Dave Reisner (falconindy) - Wednesday, 23 January 2013, 11:00 GMT
And it does honor timeout... the crypttab manpage that ships with systemd even uses timeout=0 in a footnote example.
Comment by Zygfryd Homonto (zyghom) - Saturday, 26 January 2013, 11:51 GMT
so now I'm lost...
Comment by Tom Gundersen (tomegun) - Saturday, 26 January 2013, 12:40 GMT
Plase paste the relevant line from /etc/fstab as well as the relevant journal entries ("journalctl" as root).
Comment by Dave Reisner (falconindy) - Saturday, 26 January 2013, 16:55 GMT
No, just post the entire /etc/fstab and /etc/crypttab.
Comment by Zygfryd Homonto (zyghom) - Saturday, 26 January 2013, 18:22 GMT
21:51:53 root@baboonsony:/home/papio# cat /etc/fstab | grep -v '#'
tmpfs /tmp tmpfs nodev,nosuid,size=8G 0 0
none /dev/shm tmpfs defaults,size=8G,noexec,nodev,nosuid 0 0
debugfs /sys/kernel/debug debugfs defaults 0 0
/dev/sda7 / ext4 defaults 0 1
/dev/sda9 none swap defaults 0 0
/dev/mapper/home /home ext4 defaults 0 1

21:52:01 root@baboonsony:/home/papio# cat /etc/crypttab | grep -v '#'
home /dev/disk/by-uuid/b3f57f29-994b-417b-9485-525c567fc453 - timeout=0
Comment by Dave Reisner (falconindy) - Saturday, 26 January 2013, 18:52 GMT
Please get rid of the /dev/shm and debugfs entries.

And as stated earlier, what's timing out isn't the crypttab entry, it's /dev/mapper/home. Add x-systemd.device-timeout=0 to your /etc/fstab for /dev/mapper/home.
Comment by Zygfryd Homonto (zyghom) - Sunday, 27 January 2013, 03:52 GMT
there is no change at all

07:16:52 root@baboonsony:/home/papio# cat /etc/crypttab | grep -v '#'
home /dev/disk/by-uuid/b3f57f29-994b-417b-9485-525c567fc453
-
07:16:53 root@baboonsony:/home/papio# cat /etc/fstab | grep -v '#'
tmpfs /tmp tmpfs nodev,nosuid,size=8G 0 0
/dev/sda7 / ext4 defaults 0 1
/dev/sda9 none swap defaults 0 0
/dev/mapper/home /home ext4 x-systemd.device-timeout=0,defaults 0 1


also command "journalctl -xb" shows for this related (I think) timeout such info:

Jan 27 07:05:47 baboonsony systemd-cryptsetup[468]: Timed out
Jan 27 07:05:47 baboonsony systemd-cryptsetup[468]: Failed to query password: Timer expired
Jan 27 07:05:47 baboonsony systemd[1]: systemd-cryptsetup@home.service: main process exited, code=exited, status=1/FAILURE
Jan 27 07:05:47 baboonsony systemd-journal[141]: Forwarding to syslog missed 14 messages.
-- Subject: One or more messages could not be forwarded to syslog
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/0027229ca0644181a76c4e92458afa2e
--
-- One or more messages could not be forwarded to the syslog service
-- running side-by-side with journald. This usually indicates that the
-- syslog implementation has not been able to keep up with the speed of
-- messages queued.
Jan 27 07:05:47 baboonsony systemd[1]: Failed to start Cryptography Setup for home.
-- Subject: Unit systemd-cryptsetup@home.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit systemd-cryptsetup@home.service has failed.
--
-- The result is failed.
Jan 27 07:05:47 baboonsony systemd[1]: Dependency failed for Encrypted Volumes.
-- Subject: Unit cryptsetup.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit cryptsetup.target has failed.
--
-- The result is dependency.
Jan 27 07:05:47 baboonsony systemd[1]: Dependency failed for dev-mapper-home.device.
-- Subject: Unit dev-mapper-home.device has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit dev-mapper-home.device has failed.
--
-- The result is dependency.
Jan 27 07:05:47 baboonsony systemd[1]: Dependency failed for /home.
-- Subject: Unit home.mount has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit home.mount has failed.
--
-- The result is dependency.
Jan 27 07:05:47 baboonsony systemd[1]: Dependency failed for Local File Systems.
-- Subject: Unit local-fs.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
   cry.jpg (119.2 KiB)
Comment by Zygfryd Homonto (zyghom) - Sunday, 27 January 2013, 04:01 GMT
IMHO it is timeout for phassprase by cryptsetup - not timeout for mounting
that is why I don't know why it should be in /etc/fstab
but as I am a lamer... ;-)
let me know if more info is required please and thank you for your time

it is not killing issue but annoying at least
and making my system not being KISS
Comment by Dave Reisner (falconindy) - Sunday, 27 January 2013, 04:28 GMT
You removed the timeout from the crypttab entry... what did you expect to happen? You need a timeout for the device to show up in crypttab and a timeout for the device to show up in /etc/fstab. Both of these things are separate and necessary.

No, this isn't annoying, this is how device dependencies work.
Comment by Zygfryd Homonto (zyghom) - Sunday, 27 January 2013, 05:18 GMT
OK, let me summarize it:
1-first timeout in /etc/crypttab to wait for phasprasse
2-second in /etc/fstab to wait with mounting until it is taken by cryptsetup
and - as you expected - it is working

thank you very much ;-)

Loading...