Conditional module loading with dracut

Ran into an issue with dracut-install not finding a kernel module with the new 6.2 branch:

dracut-install: Failed to find module 'vfio_virqfd'

After doing some research, I found that this module is now built into the kernel so adding it via dracut is not necessary. However, since this does not apply to my (2) other kernels - LTS and 515-LTS - I can’t remove this from my dracut config.

Is there a way to specify kernel versions with dracut-install? If not, can I just ignore the error; the kernel seemed to install just fine.

Check out this section? :thinking: I’m not expert at dracut.

Removing a module

Thanks for the link. I used it to convert to dracut a while back. I can easily remove the module from my config file, but then it won’t be built when upgrading the 6.1.x and 5.15.x kernels.