matteoraggi
Posts: 128
Joined: Thu Dec 01, 2016 11:04 am

How much often update raspbian?

Sun Jan 22, 2017 1:51 pm

Hi, I am managing 8 raspbian and I am updating them manually, how much often do you suggest me to check the updates and apply them? Does exist an automatic mode?

In my particular case, I will have dozens and dozens of Raspberry with raspbian 8 pixel OS, far from me hundreds of Km, connected online into some public shops. All these Pis are running by themselves, without that no one touch them, and all connected to the web trough lan or wifi.
Raspberry Pi 3 model B - Raspbian 8 Jessie and buster and ubuntu core server 18 lts

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sun Jan 22, 2017 1:53 pm

If it's running as an internet server you MUST do it at least once a week possibly more frequently.

If it's just a client machine do it once a month.

All of my Raspberries have

Code: Select all

root@eagle /etc/apt/apt.conf.d # cat 02periodic
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::MaxAge "5";
APT::Periodic::MinAge "2";
APT::Periodic::Verbose "0";
root@eagle /etc/apt/apt.conf.d #
That /etc/apt/apt.conf.d/02periodic file means every day any new packages get downloaded, so there's no delay when I run my weekly dist-updates.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

matteoraggi
Posts: 128
Joined: Thu Dec 01, 2016 11:04 am

Re: How much often update raspbian?

Sun Jan 22, 2017 2:02 pm

Great!
On my devices I am running only 3 software:
1) screenshot
2) dataplicity for remote control
4) omxplayer or another similar video playlist player
5) syncthing to sync files
How much si the risck to break something updating raspbian?
Raspberry Pi 3 model B - Raspbian 8 Jessie and buster and ubuntu core server 18 lts

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sun Jan 22, 2017 2:27 pm

matteoraggi wrote: How much si the risk to break something updating raspbian?
It's very unlikely due to the cautious way that DebIan is updated. The only thing that's ever left any of my Raspberries unbootable is running sudo rpi-update. Don't ever run that.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

matteoraggi
Posts: 128
Joined: Thu Dec 01, 2016 11:04 am

Re: How much often update raspbian?

Mon Jan 30, 2017 12:53 am

2 Questions :
1) How to launch the upgrades at a certain time, for example during the night?

2) Your script that you suggest me, is the equivalent to this command line?

Code: Select all

sudo apt-get update && sudo apt-get upgrade
Raspberry Pi 3 model B - Raspbian 8 Jessie and buster and ubuntu core server 18 lts

matteoraggi
Posts: 128
Joined: Thu Dec 01, 2016 11:04 am

Re: How much often update raspbian?

Sun Jun 04, 2017 10:00 am

What do you think about this solution to upgrade automatically raspbian/debian?
https://wiki.debian.org/UnattendedUpgrades
Raspberry Pi 3 model B - Raspbian 8 Jessie and buster and ubuntu core server 18 lts

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sun Jun 04, 2017 10:32 am

matteoraggi wrote:What do you think about this solution to upgrade automatically raspbian/debian?
https://wiki.debian.org/UnattendedUpgrades
It seems like a good idea until some package breaks your system.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Ernst
Posts: 1235
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: How much often update raspbian?

Sun Jun 04, 2017 12:42 pm

DougieLawson wrote:
matteoraggi wrote:What do you think about this solution to upgrade automatically raspbian/debian?
https://wiki.debian.org/UnattendedUpgrades
It seems like a good idea until some package breaks your system.
It must not be a broken package, just upgrading can do damage as well.
About a week ago I was already on 4.9.24 for some time on all raspberries except one that serves as NAS with cifs/nfs and a few other services. I did the upgrade early in the evening and everything looked fine. The next morning checking all systems I noticed that on the NAS all processors were running at 100% and the clock was being throttled because of high temperature. A reboot did not solve the problem. I decided to go back 4.4.50 using a backup from the SD card, did not solve the problem either. Then I noticed that smbd was causing the problem, hogging all processors, causing temperature to increase. A coordinated reboot of all Raspbian clients solved the problem. While shutting down the clients I could see how the load decreased back to normal, after restart of the clients the problem did not come back.

With an unattended automatic upgrade I would not have noticed the problem that quickly and it would have affected the performance of my web sites that are installed on the same system.
The road to insanity is paved with static ip addresses

gkreidl
Posts: 6100
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: How much often update raspbian?

Sun Jun 04, 2017 1:35 pm

Ernst wrote:
DougieLawson wrote:
matteoraggi wrote:What do you think about this solution to upgrade automatically raspbian/debian?
https://wiki.debian.org/UnattendedUpgrades
It seems like a good idea until some package breaks your system.
It must not be a broken package, just upgrading can do damage as well.
About a week ago I was already on 4.9.24 for some time on all raspberries except one that serves as NAS with cifs/nfs and a few other services. I did the upgrade early in the evening and everything looked fine. The next morning checking all systems I noticed that on the NAS all processors were running at 100% and the clock was being throttled because of high temperature. A reboot did not solve the problem. I decided to go back 4.4.50 using a backup from the SD card, did not solve the problem either. Then I noticed that smbd was causing the problem, hogging all processors, causing temperature to increase. A coordinated reboot of all Raspbian clients solved the problem. While shutting down the clients I could see how the load decreased back to normal, after restart of the clients the problem did not come back.

With an unattended automatic upgrade I would not have noticed the problem that quickly and it would have affected the performance of my web sites that are installed on the same system.
There seems to be a problem with the latest version of the Samba server. I noticed something very similar: after a reboot, the samba server daemon runs at high processor load, until I open each share from each other RPi which has mounted the shares (from the file manager) at least once.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Fri Jun 09, 2017 9:27 am

after reading this topic, I added the file 02periodic, as mentioned above.
and regularly I run "sudo apt-get upgrade" to see what gives.
and sometimes there is one update.
this morning:

Code: Select all

fred44nl@raspberrypi:~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
  libasprintf0c2
Use 'apt-get autoremove' to remove it.
Done
The following packages have been kept back:
  gdb ifupdown libgl1-mesa-dri libgphoto2-6 libldap-2.4-2 libpam-systemd
  libsystemd0 libudev1 python-openssl rsyslog systemd udev
The following packages will be upgraded:
  autoconf autopoint bash-completion debhelper dh-autoreconf dh-python
  dh-strip-nondeterminism dmidecode e2fslibs e2fsprogs firmware-atheros
  firmware-brcm80211 firmware-libertas firmware-realtek gdbserver geoip-database
  gettext gettext-base libasprintf0c2 libassuan0 libblas-common libblas3 libcomerr2
  libcups2 libdrm-amdgpu1 libdrm-freedreno1 libdrm-nouveau2 libdrm-radeon1 libdrm2
  libfile-stripnondeterminism-perl libgcrypt20 libgeoip1 libgl1-mesa-glx
  libglapi-mesa libglib2.0-0 libglib2.0-data libgpg-error0 libgphoto2-l10n
  libjs-jquery libjs-sphinxdoc libjs-underscore libksba8 liblapack3 libsqlite3-0
  libss2 libssl1.0.0 linux-libc-dev manpages manpages-dev openresolv openssl
  python-dnspython python-imaging python-ndg-httpsclient python-numpy python-pil
  python-pkg-resources python-pyasn1 python-requests python-serial
  python-setuptools python-six python-twisted-bin python-twisted-core
  python-twisted-web python-urllib3 python3-numpy python3-pil shared-mime-info
  systemd-sysv tar usb-modeswitch usb-modeswitch-data
73 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
Need to get 41,8 MB of archives.
After this operation, 27,6 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
far too many updates, something could be wrong.
I ran "sudo apt-get update" manually, and the result of "sudo apt-get upgrade" was:

Code: Select all

fred44nl@raspberrypi:~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
all the more reason not to run apt-get upgrade automatically.
headless RPi 3B running from usbhdd.

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Fri Oct 06, 2017 12:14 pm

sorry to bring this topic back :)

my RPI has the /etc/apt/apt.conf.d/02periodic file, so updates are downloaded whenever available.
every so often I run sudo apt-get upgrade manually.
and sometimes there is something to update.
but uname -a says "raspberrypi 4.9.35-v7+"

is this the most recent kernel ??
if not, how do I get this installed ??
headless RPi 3B running from usbhdd.

DirkS
Posts: 9947
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How much often update raspbian?

Fri Oct 06, 2017 5:33 pm

fred44nl wrote:
Fri Oct 06, 2017 12:14 pm
is this the most recent kernel ??
if not, how do I get this installed ??
No it's not the latest kernel.
Are you running Raspbian Jessie? If so then it's probably the latest (and last) for that OS.
The RPF has switched to Stretch and there will be no further updates for Jessie in its repository.

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Fri Oct 06, 2017 9:01 pm

ok, I am running Jessie, at least for the moment.
headless RPi 3B running from usbhdd.

RonR
Posts: 520
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: How much often update raspbian?

Sat Oct 07, 2017 1:15 am

fred44nl wrote:
Fri Oct 06, 2017 12:14 pm
but uname -a says "raspberrypi 4.9.35-v7+"

is this the most recent kernel ??

Code: Select all

root@FreePBX:~# uname -a
Linux FreePBX 4.9.52-v7+ #1038 SMP Fri Sep 29 16:26:52 BST 2017 armv7l GNU/Linux

root@FreePBX:~# lsb_release -d
Description:    Raspbian GNU/Linux 8.0 (jessie)
fred44nl wrote:
Fri Oct 06, 2017 12:14 pm
if not, how do I get this installed ??
rpi-update

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sat Oct 07, 2017 6:55 am

DON'T ever run rpi-update, it gets the latest experimental bootcode and experimental kernel and could leave your Raspberry in an unbootable state.

The stable kernel and bootcode is delivered with sudo apt update && sudo apt -y dist-upgrade and is well tested before being delivered.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
rpdom
Posts: 15242
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How much often update raspbian?

Sat Oct 07, 2017 7:29 am

Running Jessie you have two options.

a) Upgrade to Stretch (this is the preferred option)

b) Run rpi-update (this may be risky)

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Sat Oct 07, 2017 7:58 am

ok, thanks
how long will there be occasional updates for modules and kernel of Jessie ??
headless RPi 3B running from usbhdd.

fruitoftheloom
Posts: 20773
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How much often update raspbian?

Sat Oct 07, 2017 8:14 am

fred44nl wrote:
Sat Oct 07, 2017 7:58 am
ok, thanks
how long will there be occasional updates for modules and kernel of Jessie ??

Raspbian Jessie is end of life, do not expect anything except possible security update if a severe issue needs to be fixed...

Raspbian Stretch (Debian Stretch was actually released 6 months ago) has been out 3 months and now is the time to migrate...........
Retired disgracefully.....

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Sat Oct 07, 2017 10:54 am

fruitoftheloom wrote:
Sat Oct 07, 2017 8:14 am
now is the time to migrate...........
yes, ok, but there is a dilemma :)
updating an existing Jessie installation is possible, but not recommended.
I run my RPI headless, booting and running from an usbhdd, i.e. the only thing read from the micro-SD card is /boot/cmdline.txt
this would mean, that I have to start over from scratch, or is there an other way ??
headless RPi 3B running from usbhdd.

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sat Oct 07, 2017 2:55 pm

fred44nl wrote:
Sat Oct 07, 2017 10:54 am

updating an existing Jessie installation is possible, but not recommended.
Eh? Ten of my 14 raspberries went from Jessie to Stretch that way. Three got a fresh download and a re-install, one is still running Jessie (with 204 days of up time).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Sat Oct 07, 2017 3:13 pm

yes well, on https://www.raspberrypi.org/blog/raspbian-stretch/ it says:
HOW TO GET RASPBIAN STRETCH

As this is a major version upgrade, we recommend using a clean image; these are available from the Downloads page on our site as usual.

Upgrading an existing Jessie image is possible, but is not guaranteed to work in every circumstance. If you wish to try upgrading a Jessie image to Stretch, we strongly recommend taking a backup first – we can accept no responsibility for loss of data from a failed update.

To upgrade, first modify the files /etc/apt/sources.list and /etc/apt/sources.list.d/raspi.list. In both files, change every occurrence of the word ‘jessie’ to ‘stretch’. (Both files will require sudo to edit.)
are you saying that these warnings are just for staying out of the discussion when it fails ??
headless RPi 3B running from usbhdd.

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sat Oct 07, 2017 3:18 pm

Those warnings basically say "take a bootable backup before you start".
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Sat Oct 07, 2017 3:36 pm

DougieLawson wrote:
Sat Oct 07, 2017 3:18 pm
"take a bootable backup before you start".
I would not know how to do this, as Raspbian Lite, the addidional software and all my data is on an usbhdd of 1 TB.

but what if the update goes sauer ??
can I start over with a new download of Stretch Lite, get it running from the SD-card and copy that to the usbhdd, just like I did before ??
the command used was: "sudo rsync -axv / /mnt"
this comes from viewtopic.php?f=29&t=44177

mind you, the 1st time I did this, the usbhdd was completely empty.
headless RPi 3B running from usbhdd.

User avatar
DougieLawson
Posts: 36179
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How much often update raspbian?

Sat Oct 07, 2017 4:29 pm

If you can't take a backup, then you will have to start with a factory fresh SDcard and build Stretch on that.

Raspbian has a built-in SDCard cloning tool that will create a bootable backup for you.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: How much often update raspbian?

Sat Oct 07, 2017 5:29 pm

DougieLawson wrote:
Sat Oct 07, 2017 4:29 pm
If you can't take a backup, then you will have to start with a factory fresh SDcard and build Stretch on that.
was afraid of that.
the question is: can I copy the new system to the usbhdd - without reformatting or repartitioning it ??
Raspbian has a built-in SDCard cloning tool that will create a bootable backup for you.
haven't found it yet, but will it make a backup from the system that's on the usbhdd now ??
headless RPi 3B running from usbhdd.

Return to “Raspbian”