Hello, I recently switched back to using UKIs with dracut as their generator % emerge -pqv installkernel [ebuild R ] sys-kernel/installkernel-57 [57] USE="dracut systemd systemd-boot uki -efistub -grub -refind -ugrd -ukify" Installing self built kernels works OOTB with the kernel's 'make install' call (the UKI ends up in a folder in /efi that gets properly picked by systemd-boot during boot), however when I want to I try to regenerate the UKI after editing settings in /etc/dracut.conf.d/ folder % sudo dracut -f --kver 6.14.2-tkg-eevdf dracut[I]: Executing: /usr/bin/dracut -f --kver 6.14.2-tkg-eevdf dracut[F]: Can't find a kernel image '/boot/vmlinuz-6.14.2-tkg-eevdf' to create a UEFI executable dracut looks for a kernel image /boot/vmlinuz-$kver that doesn't get installed. And actually I am not sure where that vmlinuz gets installed by installkernel with its OOTB config (the useflags above without the file /etc/kernel/install.conf) so it can be found by dracut, I also did not find a setting in dracut that makes it look for kernel elsewhere than /boot/vmlinuz-$kver (but installkernel does make it work and makes it pick up the image from a temporary folder in /tmp). As a workaround, the installkernels docs [1] shows that I can set "layout=compat" in /etc/kernel/install.conf. After that, installing UKI kernels still works (a uki gets installed by dracut in /efi), and installkernel creates /boot/kernel-6.14.2-tkg-eevdf, which is better so I can regenerate UKIs, but I still need to rename it to /boot/vmlinuz-6.14.2-tkg-eevdf so dracut can find it (changing "kernel" to "vmlinuz"). I am most probably missing some critical piece of information and I would love some input in the matter. Or does installkernel need to be tweaked ? Thanks ! as usual. [1] https://wiki.gentoo.org/wiki/Installkernel
If your calling Dracut manually then you have to specify the --kernel-image argument manually (Dracut has a default value for this parameter, but as you found out this default is not very useful). You can find it /usr/src/linux-VERSION or if you're using a distribution kernel it is also in /lib/modules/VERSION. By design, the kernel image itself will not be installed to /boot, /efi or anywhere else if an UKI was installed, that would be unnecessary duplication. The kernel image is inside the UKI after all. If you wish to regenerate the UKI after changing some Dracut settings, then the easiest way is to simply run 'make install' again (or if you're using a dist-kernel 'emerge --config gentoo-kernel....').
Turns out I simply needed to have `vmlinuz`, i.e. arch/x86/boot/bzImage (or the output of `make -s image_name`), copied over to /lib/modules/<kernel-version>/vmlinuz