dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
598 stars 397 forks source link

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

Closed AndrewAmmerlaan closed 1 year ago

AndrewAmmerlaan commented 1 year ago

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