-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boot with crypt-gpg stuck at password prompt #2004
Comments
After trying out different things, I found out that the following change resolves the issue:
I'd be happy to create a pull request, but I am not sure what |
@lapseofreason Hi, are you using a GPG smartcard? It is interesting, I do not know why Could you could try this: ask_for_password \
--cmd "[ \"${useSmartcard}\" = \"1\" ] && GNUPGHOME=$gpghome gpg --card-status --no-tty > /dev/null 2>&1; gpg $opts --decrypt $mntp/$keypath" \
--prompt "${inputPrompt:-Password ($keypath on $keydev for $device)}" \
--tries 3 --tty-echo-off |
@LinkTed Thank you very much for your reply! No, I am not using a GPG smartcard. I use a gpg key file + passphrase that is entered by hand.
Sorry, I made a mistake when saving the file, this is why I initially thought it worked. In fact, I tried the command you proposed and it did not work: It asks for the passphrase 3 times and then it fails with claiming the passphrase is invalid. Exactly as it was with the current version provided by dracut. |
@LaszloGombos I will try to make a bug fix for that. Could you also try if it works for you then? Because, I test with a gpg card. |
Here is the commit: f65cffa |
@LinkTed Thank you very much for the patch! I tested it with a key file without a gpg card and it works. |
@lapseofreason Thanks for testing. I would do a PR then. |
If no GPG smart card is used then the card-status breaks the decryption of the keyfile. Therefore, use the card-status only if a smart card is used to decrypt the keyfie. Fixes issue #2004
If no GPG smart card is used then the card-status breaks the decryption of the keyfile. Therefore, use the card-status only if a smart card is used to decrypt the keyfie. Fixes issue dracutdevs#2004 (cherry picked from commit e3e8108)
If no GPG smart card is used then the card-status breaks the decryption of the keyfile. Therefore, use the card-status only if a smart card is used to decrypt the keyfie. Fixes issue dracutdevs#2004
Describe the bug
I am using crypt-gpg to decrypt a luks partition that contains a volume group with the root partition. However, the boot is stuck at the command prompt, as entering the correct password just displays the password prompt again.
Distribution used
I am using Fedora 36.
Dracut version
dracut-057-3.fc36
dracut-056-1.fc36 (tested by downgrading & running dracut -f --kver ...)
linux-5.19.15-201.fc36.x86_64
Dracut config
Init system
systemd, but it is excluded in dracut (see config above) for crypt-gpg to work
To Reproduce
Expected behavior
After entering the correct password, the partition is decrypted and boot continues normally.
Additional context
I just tried a fresh install of fedora server and ran into the same issues there:
dracut-056-1.fc36
linux-5.17.5-300.fc36.x86_64
The text was updated successfully, but these errors were encountered: