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

feat(install.d): allow using dracut in combination with ukify #2495

Merged
merged 1 commit into from
Aug 22, 2023
Merged

feat(install.d): allow using dracut in combination with ukify #2495

merged 1 commit into from
Aug 22, 2023

Conversation

Nowa-Ammerlaan
Copy link
Contributor

@Nowa-Ammerlaan Nowa-Ammerlaan commented Aug 20, 2023

I've already been told this is potentially controversial but hear me out hear please. Systemd-254 now ships with a 60-ukify.install kernel-install plugin. Currently this leads to a bit of an awkward situation where there are two potential paths to make an uki. KERNEL_INSTALL_UKI_GENERATOR would be the intended way to choose between these two but it is currently only respected in 60-ukify.install but not in 50-dracut.install. This leads to weird problems if the user tries to configure this setting, potentially messing up the boot process on their system when both dracut and ukify try to make the uki (where the latter does not have an initrd to work with).

This change prevents potential problems when these settings are set. If they aren't set (the default) we assume dracut is what we want to use for the initrd/uki (i.e. the same behaviour as before the change).

If you absolutely hate it, that's okay, we can just apply this patch downstream in Gentoo. But I'd like to offer it as a PR for consideration anyway.

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

This can be simply accomplished with the KERNEL_INSTALL_INITRD_GENERATOR
and KERNEL_INSTALL_UKI_GENERATOR variables. `60-ukify.install` looks for
the initrd in the KERNEL_INSTALL_STAGING_AREA and then takes care of building
the uki.

This change makes it possible to use a configuration like this:
/etc/kernel/install.conf
layout=uki
uki_generator=ukify
initrd_generator=dracut

Without this change this configuration will fail since dracut would also
generate an uki instead of initrd, which will cause a problem in
`60-ukify.install` since it can't find an initrd to use.

Signed-off-by: Andrew Ammerlaan <[email protected]>
Copy link
Member

@aafeijoo-suse aafeijoo-suse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that our kernel-install scripts should take care of variables well-defined by kernel-install, so this patch makes sense to me. Thanks.

@LaszloGombos LaszloGombos merged commit 1664563 into dracutdevs:master Aug 22, 2023
82 of 92 checks passed
@Nowa-Ammerlaan Nowa-Ammerlaan deleted the ukify branch August 22, 2023 12:01
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Mar 25, 2024
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.

4 participants