Skip to content

Make mkinitcpio create UKIs by default if the layout is set to uki in a file understood by kernel-install

This needs !188 (merged) first to work properly (but can be adapted without)

The idea is to respect layout=uki if it is set in one of the files or environment variables understood by kernel-install.

The setting could possibly be checked elsewhere as well (mkinitcpio.conf ?), but reading kernel-install inspect has the major advantage that this can be set during a vanilla Arch install, before running pacstrap. Meaning that, just setting layout=uki prior to running pacstrap will automatically generate the proper preset files for UKI generation.

Happy to hear your thoughts !

Did some tests with linux-lts and linux-hardened, and everything seems to work quite well.

Caveats :

  • this kind of breaks the pacsave logic, as the comparison finds that linux-foo.preset is different from /usr/share/mkinitcpio/hooks.preset. But this happens in the same way if modifying the preset by hand, so unsure if it's a real problem.
  • We might need to add a check that /efi/EFI/Linux/ exists

Maybe we can also re-use this logic to avoid copying the kernel to /boot when using UKIs

Edited by cedric cvl

Merge request reports