I have managed to setup vfio on my laptop successfully however it seems dynamic binding on boot will be a problem according to this. So I would like to have a grub boot entry that will load with vfio binding for when I need a vm and another which doesn't for regular use.
However I tried reading this and a bit of searching and it seems to indicate writing my own cfg file from scratch which seems a bit daunting to me.
I am looking for a way to have two different options in grub. One will load the kernel normally with default modules and the other will load the kernel with the vfio modules.
The arch wiki only shows how to load vfio drivers and bind the gpu on boot. I want to have an option in grub where I can boot into a kernel that uses vfio drivers and have another option that doesn't have the vfio drivers loaded.
If I understand correctly, minimally reading, I think you need a new kernel, not a new grub option/line.
Modules are supposed to be built-in the booting kernel to use a kernel param to configure what you configure
It looks like a joyful journey making this work as you want, but making grub do the relevant part seems more complicated, because kernel params are generally passed the same for all kernels.
Maybe if you add (more) params and using a service to undo/disable specific param, depending on booted kernel.
Or using a fake double boot entry (personal secret ).
But this is after you achieve 1st step