site  contact  subhomenews

QV basic handling kernel version changes

October 02, 2024 — BarryK

Did some online reading about this; it is an awkward situation. With btrfs, there may be lots of snapshots, even hundreds. Some may be old, setup in a certain way, with certain apps, and working fine -- if you have updated the kernel, you may not want to bootup one of those old snapshots with the new kernel.

There is also the problem that the old snapshot will have kernel modules in /usr/lib/modules, for the old kernel, not for the new kernel. /usr/lib/firmware may also be a problem; may have correct firmware for the old kernel, not for the new.

A lot on online dscussion about the best way to handle this.

I have made a start, some basic handling:

https://github.com/bkauler/woof-quantum-vis/commit/cf5d3036d237bac510674133c431f50a2b963bfb

So, when you choose to bootup a different snapshot from the default, the 'init' script will look to see if /usr/lib/modules/<default kernel version> exists. If not, will offer to update the snapshot to use the default kernel.

Or, will offer to change the default kernel to the kernel version that is in the chosen snapshot. That may be more than one to choose from.

It can be fleshed out a bit more. Haven't thought about /usr/lib/firmware. Not tested yet. The code would be more elegant if could use kexec.     

Tags: quirky