You are not logged in.
Pages: 1
Hello,
The other day I had a conversation with one of my colleagues who was struggling with his windows updates. He had to reboot several times to get the system running again.
I told him that arch doesn't require a reboot after a system upgrade and everything keeps working.
But now I'm wondering if I was correct... ![]()
Last edited by chrisdb (2019-04-29 20:14:52)
Failure is success in progress.
A.E.
Offline
It's always advisable to reboot after a kernel update otherwise if it tries to load new modules they won't exist.
Offline
It's always advisable to reboot after a kernel update otherwise if it tries to load new modules they won't exist.
ok, and for other stuff like xorg, gnome, xfce, ...?
Failure is success in progress.
A.E.
Offline
Running processes might crash over unversioned dlopened objects (plugins), but simply restarting the process (which might be your desktop shell) will do; no need for a reboot there.
Also thou shalt not conduct partial updates…
On a more technical level: you don't have to reboot ever, you can even just start the new kernel and there're live patching mechanisms for systems that require 100% uptime.
But for a desktop system, hitting the reboot button once and after there's a huge list of updates is the smart thing to do, because the system will reboot much faster than you could sort out things.
Offline
Some of this may not be relevant in the current systemd era but the useful command in post #12 is really, really useful to determine what needs to be restarted after updating.
Offline
And if/when you reboot an arch system after an update, it really just reboots.
Windows' "reboot" does god knows how many other things, stalls, re-reboots, re-installs garbage that the user didn't ask for, goes for coffee, phones home, re-re-reboots, and then tells you that you either A) have more updates waiting as it's been so long since you started the update process that there are even more now, or B) you do not have the necessary dozens of gigabytes of empty disk space required for the update.
FYI, my server running arch has been up for 116 days. After updates involving server processes I do `systemctl restart` them, but that's it. This is often not necessary, but it's trivial to do - it's easier to restart them than it is to check for the off chance that they might need a restart.
EDIT: how does anything in this thread relate in any way to your title?
Last edited by Trilby (2019-04-29 13:53:25)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Was somewhat of a click bait title for me (expecting proposed script to update upon startup). Turns out informative though.
how does anything in this thread relate in any way to your title?
Lol agree. OP, consider a retitle.
My updated bash alias after reading this:
alias Syu='sudo pacman --color=always -Syu ; echo "Running needtorestart script" ; needtorestart'needtorestart:
#!/bin/bash
if lsof | grep 'DEL.*lib' &>/dev/null ; then
echo "Restart needed."
else
echo "No need to restart."
fiAdded this to existing Syu alias because of too many similar, forgotten about, and unused snippets in my ~/bin.
Waiting ... 3 - 2 - 1 Trilby comes up with cool one-liner replacement.
Last edited by NuSkool (2019-04-29 19:46:14)
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 7 8745HS w/ Radeon 780M Graphics
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 5 PRO 2400GE w/ Radeon Vega Graphics grep -m1 'model
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 7 PRO 5850U with Radeon Graphics
grep -m1 cpu /proc/cpuinfo : MIPS 24Kc V7.4
Offline
EDIT: how does anything in this thread relate in any way to your title?
Fair enough ![]()
Post retitled
Failure is success in progress.
A.E.
Offline
Waiting ... 3 - 2 - 1 Trilby comes up with cool one-liner replacement.
Whether or not it should be one line is up to you, but you can simplify that quite a bit by using the -q flag to grep:
lsof | grep -q "DEL.*lib" && echo "Restart needed"Personally I'd drop the else, but that may be a matter of taste. But if you have comparable tastes, this could easily be added to the alias rather than being another script. Even if you wanted the else clause, you could still put it in the alias (perhaps with a || operator) and that'd then be a onliner, albeit an ugly one.
However, I'd not work on polishing this much as the logic seems flawed. Deleted libs do not suggest a reboot is necessary - simply restarting the relevant processes would be sufficient. A reboot would only be needed upon a kernel upgrade which if you want an additional explicit message would be better off done with a pacman hook.
In fact, processes running with open file descriptors to "deleted" libs will still keep running just fine as long as they are running. So those "DEL" lines are not at all relevant to the question at hand. The only issue is files that are not yet open, but would be attempted to be opened to to the currently running kernel being older than the on-disk modules.
So aside from a pacman hook on the kernel package, the relevant test would be simply:
[ -d "/usr/lib/modules/$(uname -r)" ] || echo 'Reboot needed'Last edited by Trilby (2019-04-29 22:55:22)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1