How do I add akmods like nvidia or v4l2loopback to kernel-uki-virt?

I can’t find any documentation for that. Historically it was done (as I did back in EndeavourOS) by locally generating the uki using dracut. Now that there is kernel-uki-virt, how is it done?

You still need to create your own uki image.

The kernel-uki-virt, as the word “virt” suggests, is meant to run in a virtual machine with well-defined virtual hardware and well defined requirements for kernel drivers.

You can create the uki image either by using dracut with the --uefi or use the /usr/lib/systemd/ukify program. See the man page for either one.

1 Like