How to setup custom grub profile?

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.

But what does the Arch Wiki have to say? PCI passthrough via OVMF - ArchWiki

1 Like

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 :slightly_smiling_face:

1 Like

Is it possible to copy the kernel and switch modules?

What is this?

Even if I have some idea of where or what to look for, it is out of the scope of Garuda support and needs personal involvement and testing.

Maybe

creating a new custom kernel profile in /etc/mkinitcpio.d/, after extensive RTFMing on that.
I've never done it, obviously... :laughing:
If you find a way to do it, please share your findings. :wink:

2 Likes

Idk and my searches were failing me. Hence why I asked. You may have enough idea about everything to know to look into mkinitcpio. I just learned about it.

Now this is a lead.

1 Like

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 :laughing: ).
But this is after you achieve 1st step :stuck_out_tongue_winking_eye:

2 Likes

Well I'll figure it out and that will decide what I settle on. If I can get this setup that will be good but its not the end of the world.

That's not a solution, but I think you want to close this topic.

8 Likes