Page 1 of 1

how and when update or upgrade

Posted: Sun Mar 05, 2017 10:56 am
by fred44nl
installed my first Raspberry Pi 3B in october last year.
from time to time I run the normal update/upgrade commands.
currently I have:
Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
these commands do not update the kernel, nor the firmware.
as I see discussions about kernel 4.9 I am wondering if it is time to update my kernel.
there are instructions about this, giving 2 options:
1. sudo apt-get install raspberrypi-bootloader
2. sudo rpi-update
what's the best advice ??

Re: how and when update or upgrade

Posted: Sun Mar 05, 2017 11:02 am
by mattmiller
Don't change kernels
Doing so is only for people who don't mind testing out things and are prepared for things to break

Re: how and when update or upgrade

Posted: Sun Mar 05, 2017 11:27 am
by DougieLawson
Run sudo apt-get update && sudo apt-get -y dist-upgrade and you will get a fully supported, stable, non-testing 4.4.50+ / 4.4.50-v7+ kernel.

DO NOT run rpi-update unless you completely understand what it does to your system and are ready to rebuild things when it won't boot or you can't get connected to it.

Re: how and when update or upgrade

Posted: Sun Mar 05, 2017 11:45 am
by fred44nl
ok, clear :)
how often should I run sudo apt-get -y dist-upgrade ??
this did not give me 4.4.50 tho.
something wrong with my /etc/apt/sources.list ??
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

deb http://www.deb-multimedia.org jessie main non-free
deb-src http://www.deb-multimedia.org jessie main non-free

deb http://httpredir.debian.org/debian jessie-backports main non-free
deb-src http://httpredir.debian.org/debian jessie-backports main non-free

deb http://ftp.de.debian.org/debian jessie-backports main

Re: how and when update or upgrade

Posted: Sun Mar 05, 2017 12:31 pm
by DougieLawson
How often you upgrade depends on what your Raspberry is doing.

For a server you should be looking for security fixes every day and updating once a week. For a client machine (just used for web browsing and GPIO stuff, etc.) you should be looking for security fixes once a week and updating once a month.

If the machine never connects to the public internet then don't bother doing any update once your offline application works.

Re: how and when update or upgrade

Posted: Sun Apr 02, 2017 6:40 pm
by fred44nl
DougieLawson wrote:Run sudo apt-get update && sudo apt-get -y dist-upgrade and you will get a fully supported, stable, non-testing 4.4.50+ / 4.4.50-v7+ kernel.
I have done these commands a couple of times and did not get 4.4.50
until I had to reboot in order to force fsck.
I did never get an instruction nor message to reboot in order to activate the new kernel.
how can I know that I have to reboot after an upgrade ??

Re: how and when update or upgrade

Posted: Sun Apr 02, 2017 7:03 pm
by Heater
Pretty much the only time you have to reboot after an upgrade is when the kernel gets upgraded. apt-get upgrade will tell you what it is about to upgrade so you will see something about a kernel package in the list.

Mind you, it's probably a good idea to reboot after an upgrade occasionally just so you are totally sure everything restarts as it should. Such breakage is rare but has been known to happen. Especially true if you Pi is normally running unattended and you want to be sure it comes up again after a power failure.

Re: how and when update or upgrade

Posted: Mon Apr 03, 2017 8:08 am
by DougieLawson
fred44nl wrote:
DougieLawson wrote:Run sudo apt-get update && sudo apt-get -y dist-upgrade and you will get a fully supported, stable, non-testing 4.4.50+ / 4.4.50-v7+ kernel.
I have done these commands a couple of times and did not get 4.4.50
until I had to reboot in order to force fsck.
I did never get an instruction nor message to reboot in order to activate the new kernel.
how can I know that I have to reboot after an upgrade ??
Then you mustn't be running Raspbian Jessie, because every using Jessie will have 4.4.50 on a reboot after doing that dist-upgrade.

Re: how and when update or upgrade

Posted: Mon Apr 03, 2017 9:02 am
by fred44nl
I sure am running Raspbian Jessie Lite.
but I never realised that a dist-upgrade might need a reboot.
I didn't see nor pay sufficient attention to the messages coming from dist-upgrade.
anyway, I now have 4.4.50 :)

Re: how and when update or upgrade

Posted: Mon Apr 03, 2017 10:29 am
by mfa298
fred44nl wrote:I sure am running Raspbian Jessie Lite.
but I never realised that a dist-upgrade might need a reboot.
I didn't see nor pay sufficient attention to the messages coming from dist-upgrade.
anyway, I now have 4.4.50 :)
It's fairly standard that if you upgrade the kernel to get that new kernel you need to reboot. This is because the kernel is the first part of linux to be loaded as the system boots. This applies to pretty much every OS out there (that's why you have to normally reboot windows as part of it's monthly update as well).

Re: how and when update or upgrade

Posted: Mon Apr 03, 2017 10:58 am
by fred44nl
mfa298 wrote:It's fairly standard that if you upgrade the kernel to get that new kernel you need to reboot.
yes, I know, but I have not seen any message, telling me, that the updates available, did include a new kernel.
let's say I do apt-get update & upgrade once a week without reboot ànd apt-get dist-update & upgrade once a month with reboot, I would be OK, I guess.

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 1:25 pm
by fred44nl
to-day I ran sudo apt-get update & upgrade and noticed there was a kernel update.
after this, I rebooted the RPi but as far as I can tell the kernel is still 4.4.50-v7
am I missing something ??

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 1:41 pm
by fruitoftheloom
fred44nl wrote:to-day I ran sudo apt-get update & upgrade and noticed there was a kernel update.
after this, I rebooted the RPi but as far as I can tell the kernel is still 4.4.50-v7
am I missing something ??
Schermafbeelding 2017-04-10 om 15.07.30.jpg

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 1:47 pm
by fred44nl
the command sudo dist-upgrade reports:

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 1:53 pm
by mfa298
It looks like the package version got bumped last week, although the packaged kernel dates back to feb

Code: Select all

pi@pi2:~ $ dpkg -l raspberrypi-kernel
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
+++-=========================-=================-=================-========================================================
ii  raspberrypi-kernel        1.20170405-1      armhf             Raspberry Pi bootloader
pi@pi2:~ $ uname -a
Linux pi2.private.yapd.net 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
I'm wondering if it was a firmware update and the kernel package version got bumped along with it.

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 1:57 pm
by fred44nl
both commands show exactly the same output on my RPi.

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 2:10 pm
by fruitoftheloom
fred44nl wrote:both commands show exactly the same output on my RPi.
Would appear to be a recent GPU Firmware Update

Code: Select all

uname -a

Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux

Code: Select all

/opt/vc/bin/vcgencmd version

Apr  5 2017 11:49:52 
Copyright (c) 2012 Broadcom
version 3ca4cf4a663c5351eaec08b29d50d6e8324981b4 (clean) (release)

Re: how and when update or upgrade

Posted: Mon Apr 10, 2017 2:16 pm
by fred44nl
fred44nl wrote:both commands show exactly the same output on my RPi.
sorry not true :)

Code: Select all

uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux