Steps to reproduce: - Full disk encryption, - Luks key is encrypted with gpg - luks key is embedded in initramfs - cmdline is: rd.luks.key=/etc/luks/key.gpg:/ - add_dracutmodules+=" dash " - omit_dracutmodues+=" bash " - build dracut Expectation: - the system should boot with new initramfs Actual: - The system failed to pick the key in initramfs - replace dash by bash and system can pick up the correct key Root Cause: There's some bashism inside runtime script, which uses == instead of = to compare. I've made a patch to fix, see attachment
The patch isn't directly tested. Since I'm using Void Linux with musl libc, which needs some patch on top of it. I made the change on top of the tip of master branch of dracut repository. Then applied the patch on top of my distribution. The patch worked fine with my particular setup.
Created attachment 1518744 [details] patch to fix
*** Bug 1663650 has been marked as a duplicate of this bug. ***
Patch looks OK. I submitted is as https://github.com/dracutdevs/dracut/pull/516. In the future, please submit patches upstream.