Wednesday, January 1, 2020

server - Automatic kernel reload after Update



I have been managing a Ubuntu Server 8.04 for quite some time now. On top of it I am running a VMWare Server Edition, which needs to recompile it's modules whenever a new kernel is installed. For that I'm executing: sudo vmware-config.pl



Until now, whenever a new version of the kernel was available I installed it, rebooted the system and rebuild the modules. But now I realized - rather by accident -, that rebuilding those kernel modules even worked without rebooting the system. VMWare is even able to startup again after that. That made me curious. I entered uname -r to see the kernel version, which showed me exactly the version I installed right before without rebooting the system.




The Manpages for uname are not exactly detailed on what is actually printed, but so far I thought it printed the actually running kernel version.



My question now is: Is it really possible the kernel reloads itself without rebooting? I did not install ksplice or a similar tool. From what I get it is now even in the repositories for Ubuntu Server 8.04. What's going on with my system? Do I have to reboot after the kernel update or not? What does uname -r print? Is the Ubuntu Server Edition shipped with a program similar to ksplice? I never read anything about a feature like that!



I checked what kees told me to do:



uname -r
2.6.24-28-server



The file in proc gave:



cat /proc/version_signature
Ubuntu 2.6.24-28.75-server


And dpkg:



dpkg -l 'linux-image*' | grep ^.i

ii linux-image-2.6.24-28-server 2.6.24-28.80


Obviously I should do a reboot then :)
Thanks for the detailed information!



The output of uname -r only shows the version up to the "ABI" number, but there can be revisions of the ABI. Only when the ABI changes do third-party modules need to be recompiled.



For more details about what you're running, read the file /proc/version_signature:




cat /proc/version_signature
Ubuntu 2.6.24-28.80-generic


This will show the kernel package version you're currently running which may differ from the most recently installed kernel. For example, in the above, the ABI is "28", which is as much as uname -r will show:



uname -r
2.6.24-28-generic



Then you can see what you have installed with dpkg:



dpkg -l 'linux-image*' | grep ^.i
ii linux-image-2.6.24-27-generic 2.6.24-27.69 Linux kernel image for version 2.6.24 on x86
ii linux-image-2.6.24-28-generic 2.6.24-28.80 Linux kernel image for version 2.6.24 on x86
ii linux-image-generic 2.6.24.28.30 Generic Linux kernel image


In the above case, if the next kernel package that got installed was versioned as 2.6.24-28.81, it would only be the "micro release" that changed. Since module compilations are tied to the ABI, no recompilation is needed, but you still need to reboot to get the kernel fixes. If the next kernel installed was versioned as 2.6.24-29.81, then the ABI will have changed, and you'll need to recompile modules after you've rebooted.




For more details about the ABI, see https://wiki.ubuntu.com/KernelTeam/BuildSystem/ABI


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...