21

According to my informations, upgrading the linux kernel needs a reboot. Rebooting a home computer is not a problem, but I don't think that it is the same thing for a server.

So does the servers that use Linux distributions reboot after upgrading the kernel, or do they use some kind of a trick to avoid booting ??

0

2 Answers 2

18

Yes, they do a "reboot", but could do a kexec_load system call to preload the new kernel.

There is the possibility of patching the running kernel as well, redhat kpatch for example. All the things which do this that I am aware of can not change the data structures.

Of course lisp machines used to be able to patch their running kernels in the last century.

1
  • 3
    There's also vanilla kexec, for just booting the new kernel immediately. Depending on your definition of "reboot", this might qualify as a non-reboot kernel upgrade.
    – phemmer
    Feb 17, 2017 at 2:26
12

A kernel change should get a reboot. You can install the kernel, and in some cases you can insert and remove modules of different kernels, but I would not advise it.

A server could be rebooted and service would be unaffected if the server is part of a cluster. You can create firewall/router clusters too, such that there is no single point of failure (SPOF). To do this you use what is called a Virtual IP (VIP) that is shared across more than one system.

If you want to experiment with this idea you can use QEMU or VirtualBox and others to create virtual networks.

2
  • 11
    What about live kernel patching?
    – jiggunjer
    Feb 16, 2017 at 20:25
  • The question was not specific to minor patching but mentions 'upgrade' which I will take to mean major version upgrades. Therefore, to 'upgrade' from 2.6 -> 3.0 I would recommend dropping the machine from load before starting upgrade work. Post kernel changes I would reboot. Since grub/lilo is likely to need changes I would suggest a courtesy reboot anyway.
    – Ed Neville
    Feb 17, 2017 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .