Bug 1663651 - crypt-gpg failed to boot with dash
Summary: crypt-gpg failed to boot with dash
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1663650 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-06 05:17 UTC by Danh Doan
Modified: 2019-01-06 15:38 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-01-06 15:38:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch to fix (3.31 KB, patch)
2019-01-06 05:48 UTC, Danh Doan
no flags Details | Diff

Description Danh Doan 2019-01-06 05:17:45 UTC
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

Comment 1 Danh Doan 2019-01-06 05:47:05 UTC
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.

Comment 2 Danh Doan 2019-01-06 05:48:28 UTC
Created attachment 1518744 [details]
patch to fix

Comment 3 Zbigniew Jędrzejewski-Szmek 2019-01-06 15:31:36 UTC
*** Bug 1663650 has been marked as a duplicate of this bug. ***

Comment 4 Zbigniew Jędrzejewski-Szmek 2019-01-06 15:38:50 UTC
Patch looks OK. I submitted is as https://github.com/dracutdevs/dracut/pull/516. In the future, please submit patches upstream.


Note You need to log in before you can comment on or make changes to this bug.