What's with all the "reboot required" after updates?

Lately this is getting as bad as Windows with needing to reboot after updates. I used to have uptimes set by the power company’s reliability or lack thereof. These past four or five months I can’t seem to go two weeks without some update forcing a reboot. :frowning:

This has been dominated by kernel patches which are almost always security related. In the distant past this wasn’t the case but I assume running for months on an unpatched kernel was getting frowned upon.

This would all be fine with me EXCEPT removing old kernels also triggers the reboot requirement. Obviously, all kernel changes must be triggering this as a policy.

FYI, two files get created when the reboot is required and get deleted on the reboot:

/var/run/reboot-required
/var/run/reboot-required.pkgs

One thing I often do is take a peek at the latter file and find the packages responsible for the reboot:

cat /var/run/reboot-required.pkgs

Kernel changes show up as the package linux-base.

2 Likes

You could try Canonical’s Livepatch Service if you’re on 16.04 LTS.

Yeah, this is annoying when you are run sudo apt autoremove and it removes an old kernel just after you rebooted to install the new kernel!

3 Likes

Exactly! Two reboots instead of one. I find autoremove (same as Synaptic’s “Automatic removable”) maintains 2 kernels so I can remove the eldest one at the same time to presuppose the result with just 1 reboot. The family can survive the 60 seconds. :stuck_out_tongue_winking_eye:

I aliased update in my .bashrc to do the following:

alias update="sudo apt update; sudo apt -q upgrade -y"
alias upgrade="sudo apt update; sudo apt -q full-upgrade -y; sudo apt autoremove"
1 Like

To be fair, you don’t have to reboot when you see the prompt. It just means you won’t be using the latest kernel (containing general or security fixes) until you next restart. No timers will start to appear or any sudden automatic reboot… unlike some other OS I knew. :wink:

Just like you can update some software while still using it, the new version won’t be used until it’s reloaded… hot-patching (as @elcste points out) is still fairly new.

3 Likes

Even Fedora makes you reboot to install any updates at all. (At least with the GUI. You can install some without rebooting via the command line.) I hope Ubuntu keeps it this way, and with snaps I think they will!

1 Like

IMHO snaps are the latest “great white hope” for ending the DLL or library versioning issues that plague all systems I’ve ever used – makes me think we should return to the days of static linking with GB hard drives setting in the end caps near the checkouts at MicroCenter for $40 if snaps don’t work out.