Updating GRUB.cfg

Hello,

I am testing isolcpu’s. I have a process that I want to run on a specific core of the CPU and not allow any other process to run on that CPU or interrupt the processing of the information on that CPU. I know that on Ubuntu-Classic I can set isolcpus= in /etc/default/grub so that it will be configured across multiple reboots and updates.

On Ubuntu-Core, I do not see this option, however, I was able to go in to /boot/grub/grub.cfg and add the isolcpu= variable to the set cmdline= variable and it works. I also tested refreshing the core snap from stable to candidate back to stable and the setting stayed, as well with updating the kernel snap and gadget snap. So this change does work.

While this method will work, I feel that it should be something easier or make a little more sense than “hacking” the grub.cfg. For example, using the snap set command for the core snap or the kernel snap. Also, if I was going to have a fleet of devices that needed this setting set, for example say a drone, having to manually update this setting would be a pain.

My question, and maybe it is already answered somewhere, is what is the plan or “correct” way to update the grub cmdline boot parameter?

Thanks,
Luke

1 Like

The right answer here is to use your own gadget (which is what ships your grub.cfg) and create your own image, especially for a production image for a “fleet of devices” where you want some snaps pre-installed and pre-configured via the model assertion and the gadget defaults you ship.

1 Like

Thanks @ogra. I looked up the gadget snap process which is exactly what is needed for a large deployment.