5

I experience that my Ubuntu Linux requires a restart every now and then and also that it needs restart more often than in the old days (maybe it's because it updates more).

I understand that updating the kernel forces a reboot but is that a convenience and technically feasible to update without rebooting and only complicated?

Is it something that is technically impossible to update while the system is running?

"The system will go down for maintenance now...."

I understand that a BIOS update forces a reboot but I don't understand why it is absolutely necessary or if that is for convenience and making it much easier to update.

Reading a similar question, there were not convincing answers.

I believe that it is running binaries that should be replaced.

  • 1
    What exactly are the problems you encounter that require you to reboot your pc to solve them? – saga Jan 15 '17 at 5:21
  • @saga I'll try and see. I add updates from Ubuntu where the updating asks me to install in the window manager, I press install and then I get the graphical prompt that I must reboot. It doesn't explicitly say what updates required the reboot. – Niklas Rosencrantz Jan 15 '17 at 14:12
  • 1
    Do you update using apt or software centre? If you use latter try upgrading with sudo apt-get update;sudo apt-get upgrade. It should work fine. Ubuntu store is not a very good tool you know. – saga Jan 16 '17 at 10:32
5

The only thing that absolutely requires a reboot is modifying the kernel. Any process can be killed if the program (or some library or other file that it depends on) has been upgraded, but that isn't the case for the kernel.

Actually, it's possible to patch a Linux kernel directly in memory sometimes. There are several tools that work at least in some cases: Ksplice, Kpatch, kGraft… Each of them works in some simple cases but not all; they typically work with security updates, as those don't change any internal interface (especially data structure formats), but not to upgrade between kernel versions. Ubuntu LTS supports kernel patching using livepatch since 16.04 with the 4.4 kernel with a proprietary client.

Although anything that isn't in the kernel can be upgraded on a running system, it still requires restarting the affected processes. On a server this means restarting the servers that use an executable, library, plugin, data file, configuration or other dependency that has been updated. On a desktop machine, this can mean getting users to log out and back in (e.g. if it's a bug in the graphics driver). Determining exactly what needs to be restarted can be difficult as it depends on the exact nature of the bug fix and how the program is used. Rather than go through the huge amount of work needed to determine this precisely, Ubuntu plays it safe and recommends a reboot in packages that think that restarting the service would be too fiddly. The way it works is that you get a prompt to reboot when a package's post-installation (post-upgrade, in this case) script declares that a reboot is required (see How can I tell what package requires a reboot of my system?).

2

As far as I know you can still use the old system after upgrading, but generally will have to reboot to experience the upgraded system.
As an exception, if I remember well, there is the KSplice technology which allows to apply security patches to a running kernel without having to reboot the system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.