FS#80240 - [systemd] 254.6 missing 90-uki-copy.install breaks system on kernel update

Attached to Project: Arch Linux
Opened by j-hap (j-hap) - Sunday, 12 November 2023, 20:23 GMT
Last edited by Christian Hesse (eworm) - Monday, 13 November 2023, 08:40 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: With package version 254.6 the 90-uki-copy.install was moved (see commit below). I let mkinitcpio create a uki and kernel-install puts it to /boot. On a kernel update however kernel-install did not move the generated uki to /boot, because the uki-copy hook was missing. I was dropped into an emergency shell on the next boot, because the .efi below /boot did not match the installed kernel.

Workaround:
- downgrade kernel so it matches the entries in /boot again or
- remove layout=uki from /etc/kernel/install.conf and reinstall kernel to create non-uki boot entries

Additional info:
https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/commit/c8e85fd3a721df07a629fe17c1bc24a75e492193

Steps to reproduce:
follow https://wiki.archlinux.org/title/Unified_kernel_image#kernel-install to set up UKI with kernel-install and mkinitcpio
remove any existing uki-.efi files from /boot
reinstall kernel
check /boot for uki-.efi files (there are none)

This task depends upon

Closed by  Christian Hesse (eworm)
Monday, 13 November 2023, 08:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  systemd 254.6-2
Comment by Toolybird (Toolybird) - Sunday, 12 November 2023, 21:24 GMT
You don't have the "systemd-ukify" pkg installed?
Comment by j-hap (j-hap) - Monday, 13 November 2023, 05:45 GMT
Correct, I have not installed it, I did not need it so far.
Comment by Toolybird (Toolybird) - Monday, 13 November 2023, 07:06 GMT
Ok, it seems clear that if you install the "systemd-ukify" pkg you'll be fine.

I'm not real familiar with UKI's..but my reading of the Wiki page leads me to believe "systemd-ukify" is a hard requirement. This is also backed up by the optional dep description for systemd:

systemd-ukify: combine kernel and initrd into a signed Unified Kernel Image

Feel free to edit the Wiki page if you think it's not clear enough.

@eworm, any comments you'd like to add here? It seems like "Not a bug" to me...
Comment by nl6720 (nl6720) - Monday, 13 November 2023, 07:14 GMT
systemd-ukify is just one of the options to create a UKI, but not the only one. Creating a UKI using only mkinitcpio is perfectly fine, so, IMO, requiring systemd-ukify just for kernel-install to support UKIs is not correct.
It is possible that in the future mkinitcpio may gain support for using ukify to create UKIs, if ukify ever gets rewritten in a compiled language, but that is still far in the future. And I imagine that then systemd-ukify wouldn't be a split-package anymore and this would not be an issue.
Comment by Toolybird (Toolybird) - Monday, 13 November 2023, 07:17 GMT
Thanks for your input @nl6720. Ok, maybe it is a packaging issue after all...
Comment by j-hap (j-hap) - Monday, 13 November 2023, 07:18 GMT
it was not necessary to have up until the last update, mkinicpio packages uki fine on its own via the https://gitlab.archlinux.org/tpowa/mkinitcpio/-/blob/a9b80b1388513462c17561fd129569465c7787e1/50-mkinitcpio.install for kernel-install. I'll add a hint to the wiki, that the necessary uki-copy was moved, so systemd-ukify is necessary now. Edit: I was typing this before I saw the previous 2 comments

Loading...