#1093209 cryptsetup: cryptdisks_start fails if plymouth is installed

Package:
cryptsetup
Source:
cryptsetup
Description:
disk encryption support - startup scripts
Submitter:
Marc Lehmann
Date:
2025-05-04 17:15:01 UTC
Severity:
normal
#1093209#5
Date:
2025-01-16 12:40:00 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

I tried to use cryptdisks_start from an ssh session. crypttab contains
these options, so decrypt_keyctl is in use:

   initramfs,luks,keyscript=decrypt_keyctl,discard

   * What was the outcome of this action?

   Starting crypto disk...crypttd01 (starting)...add_key: Invalid argument
   Error adding passphrase to kernel keyring
   ...

   * What outcome did you expect instead?

I expected to be asked for my pasphrase and everything to go o form there.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I looked at the script and straced it for a while, and it seems what happens is this:

decrypt_keyctl calls askpass. askpass looks if /bin/plymouth is execitable. If it is,
then it runs "plymouth ask-for-password <prompt>".

Unfortunately, this commands simply returns successfully without any
output. Either because I don't use plymouth, or because this was
long post-boot.

Removing plymouth made things work again.

*** End of the template - remove these template lines ***