You are not logged in.

#1 2019-04-28 19:39:21

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

arch system upgrade vs Windows update

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... smile

Last edited by chrisdb (2019-04-29 20:14:52)


Failure is success in progress.
A.E.

Offline

#2 2019-04-28 19:50:08

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: arch system upgrade vs Windows update

It's always advisable to reboot after a kernel update otherwise if it tries to load new modules they won't exist.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-04-29 06:59:52

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: arch system upgrade vs Windows update

Slithery wrote:

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

#4 2019-04-29 07:25:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,517

Re: arch system upgrade vs Windows update

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

#5 2019-04-29 07:26:19

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,681

Re: arch system upgrade vs Windows update

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

#6 2019-04-29 13:49:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: arch system upgrade vs Windows update

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

#7 2019-04-29 19:27:33

NuSkool
Member
Registered: 2015-03-23
Posts: 296

Re: arch system upgrade vs Windows update

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."
fi

Added 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

#8 2019-04-29 20:18:22

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: arch system upgrade vs Windows update

Trilby wrote:

EDIT: how does anything in this thread relate in any way to your title?

Fair enough smile
Post retitled


Failure is success in progress.
A.E.

Offline

#9 2019-04-29 22:45:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: arch system upgrade vs Windows update

NuSkool wrote:

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

Board footer

Powered by FluxBB