Linux – Should I update the kernel on a Linux machine

aptdebiangnu-screenkernellinux

As I understand it, updating to a new kernel (with the normal linux-image... package, not by rolling my own) requires a server restart.

However, one of our servers (Ubuntu 10.04) is running several extensive screen sessions. Restarting kills those which is always a major hassle to their owners (mostly because of lost session histories).

What should I do? I see several possibilites:

  • Not doing anything, that is update only non-kernel packages (perhaps use apt-pinning?)
  • Update the kernel, but not restart. (Is that smart? I seem to remember there might be some problems with loading kernel modules.)
  • Updating the kernel and restarting.
    • Is there perhaps some way to preserve the screen sessions?

I guess it ultimately boils down to this question:
How important is it to update the kernel?

I posted this question here instead of askubuntu.com as I think this is not an Ubuntu-specific issue though this server is running Ubuntu.

Best Answer

You can avoid a reboot after a kernel update with ksplice. Beside that, there is no general rule to answer the question if a update is really necessary, as this depends on many factors:

  • The nature of the bugs fixed with the patch. Many updates are only specific for certain modules, hardware drivers or platforms or they concern a situation that can not occur in your system.
  • The kind of system you run: What services does it offer, how is it connected, are your users trustworthy (for the case of a possible user privilege elevation bug)?
  • What will be the effects of the bug when triggered? Will it destroy files or let everyone become root or will some unused subsystem stop working?

Ultimately, only you can decide if a certain update is important enough to warrant a reboot, but of course their is a rule of thumb: When in doubt, do the update.