Skip to content
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

luks: make sure cryptsetup.target is installed #493

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LaszloGombos
Copy link

@LaszloGombos LaszloGombos commented Oct 12, 2024

dracut v103 introduced systemd-cryptsetup.

dracut v104 requires systemd-cryptsetup for cryptsetup.target
(dracut-ng/dracut-ng@ad52085.

CC @BtbN @Cornelicorn

@Cornelicorn
Copy link

dracut v103 introduced systemd-cryptsetup.

dracut v104 requires systemd-cryptsetup for cryptsetup.target (dracut-ng/dracut-ng@ad52085.

CC @BtbN @Cornelicorn

I tested this change before reporting it in the dracut-ng matrix room.
But the problem still shows with this:

dracut[I]: *** Including module: clevis ***
Failed to add dependency on unit: Unit cryptsetup.target does not exist
dracut[I]: *** Including module: clevis-pin-null ***
dracut[I]: *** Including module: clevis-pin-sss ***
dracut[I]: *** Including module: clevis-pin-tang ***
dracut[I]: *** Including module: clevis-pin-tpm2 ***
dracut[I]: *** Including module: btrfs ***
dracut[I]: *** Including module: crypt ***
dracut[I]: *** Including module: dm ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: kernel-network-modules ***
dracut[I]: *** Including module: systemd-cryptsetup ***

clevis is included before systemd-cryptsetup and the target doesn't exist yet.

@Cornelicorn
Copy link

dracut v103 introduced systemd-cryptsetup.
dracut v104 requires systemd-cryptsetup for cryptsetup.target (dracut-ng/dracut-ng@ad52085.
CC @BtbN @Cornelicorn

I tested this change before reporting it in the dracut-ng matrix room. But the problem still shows with this:

dracut[I]: *** Including module: clevis ***
Failed to add dependency on unit: Unit cryptsetup.target does not exist
dracut[I]: *** Including module: clevis-pin-null ***
dracut[I]: *** Including module: clevis-pin-sss ***
dracut[I]: *** Including module: clevis-pin-tang ***
dracut[I]: *** Including module: clevis-pin-tpm2 ***
dracut[I]: *** Including module: btrfs ***
dracut[I]: *** Including module: crypt ***
dracut[I]: *** Including module: dm ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: kernel-network-modules ***
dracut[I]: *** Including module: systemd-cryptsetup ***

clevis is included before systemd-cryptsetup and the target doesn't exist yet.

I think the solution would only be the reorder if this should be fixed here, i.e. installing this as 91clevis or something higher.
This is due to the way the module dependencies are only checked for including modules but not for ordering modules, see https://github.com/dracut-ng/dracut-ng/blob/main/dracut.sh#L1971

@Cornelicorn
Copy link

The imminent problem is solved by https://github.com/dracut-ng/dracut-ng/pull/711, but the dependency should still be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants