Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 25212  / 1 Year ago, wed, march 1, 2023, 10:44:14

I want to switch between different version of kernel installed on my system without reboot.



That is to say if i have '3.0.0-16-generic kernel currently running and i have older kernel 3.0.0-14-generic also there, then I maybe be able to switch to 3.0.0-14-generic(the other kernel) without rebooting .



(I need to do live kernel debugging and making changes so in order to do so i can't reboot)


More From » kernel

 Answers
5

There is no way to swap out two complete Kernels. I'm sure you can understand the significance of a monolithic kernel like Linux and why that makes it impossible to simply replace.



The closest you can get is a live-patching process using Ksplice. It converts Kernel updates into magical shims that can plug holes in a running Kernel, allowing you to keep the computer on indefinitely without needing a reboot. For your purposes, it also lets you roll back changes.



It is free for Ubuntu Desktop editions so you can play around with it but you have to pay a subscription for servers (where this sort of thing is most needed).






Just seen your edit. Ksplice probably isn't going to help if you're manually hacking and building your own Kernels for debugging as "the service" is that they provide the special updates and they're not something you can generate on your own.



If you're just building things against an official kernel, it might still work.






One more idea: Virtualisation. You could build your new kernel and swap things around in your VM and reboot. It's still going to take the time it needs to reboot but you could make the VM much more light than your development machine (base it on Ubuntu Server, drop the X server if you don't need it, etc).


[#39898] Friday, March 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wenceslockro

Total Points: 494
Total Questions: 127
Total Answers: 97

Location: Chad
Member since Mon, Dec 5, 2022
1 Year ago
;