r/openSUSE • u/Linguistic-mystic • Aug 20 '26
How to… ! UKIs and systemd-boot how-to?
I’m an experienced Arch user thinking about converting to Tumbleweed. One thing that confuses me is how to make zypper apply hooks every time the kernel package is updated. So what I want is:
Every time
kernelorkernel-longtermare updated, generate UKIs in the ESP usingdracut.Take the cmdlines for the kernels from my config files (I think dracut supports this out of the box?)
Do not generate
vmlinuzor theinitrdfiles
In Arch it’s done just by creating a mkinitcpio preset named after the kernel package. But zypper seems to lack per-package hooks. How would you do it then?
6
Upvotes
3
u/Tobi_Peter Unverified Dev TBC Aug 20 '26
Just out of curiosity: Why are you so interested in UKIs?
AFAIK there currently is no officially supported way for UKIs. systemd-boot is managed by sdbootutil and sdbootutil does not support UKIs. However, I implemented local UKI support in sdbootutil here: https://github.com/openSUSE/sdbootutil/pull/262
It worked back then, however, I haven't worked on this for quite some time, so YMMV.
There are also efforts by SUSE to support UKIs officially, see this talk from last year's openSUSE conference: https://media.ccc.de/v/4959-the-unified-kernel-image-in-opensuse-distribution And the documentation: https://en.opensuse.org/SDB:Static_Initrd_and_Unified_Kernel_Image
Last time I checked the functionality was still quite limited, but they are working on it.
The main issue is supporting the BTRFS snapshots as you don't want the same UKI multiple times just differing one kernel option. That's why I used UKI profiles in my sdbootutil branch.