Problem Upgrading from Openhabian 3.4.2 to 4.x

I´mm trying to upgrade from Openhabian 3.4.2 to 4.x and using openhabian-config option 03 but I get the message “You are running a too old version of your Operating System.”

what am I doing wrong?

I just found this very helpful post which may help you:

3 Likes

I ran into excactly this problem today. I only wanted to update my OpenHabian 3.x System with the newest fixes and got an unusable Openhabian 4.x with old OS and Java11. Nothing got me back to a working system. I completely recreated a new Openhabian from scratch (flash SD card), did a first initial config of the new system and then restored a OH backup file. I needed to do the restore twice, because of errors in first restore (whyever). I had some hickup saving the old backup file into the new OH backup directory due to access right restrictions on the backup directory. I managed it saving it first to another dir and then ssh in and move it with a sudo command. Hope this helps others to succeed.

Same Problem here: You are running a too old version of your Operating System
is there a Solution?

Upgrade the OS.
Which version do you run?

like in the Title: 3.4.2 on Raspberry Pi 4 Model B with Raspbian GNU/Linux 10 (buster)

Hier it says that both, java and Debian 11, are installed with the openhabian-config:
https://github.com/openhab/openhab-distro/releases/tag/4.0.0#upgrade-process

From the page you linked to it says:

Before doing the upgrade check that your openHABian installation is based on Debian 11 (bullseye). If your openHABian installation is still based on Debian 10 (buster), upgrade to a newer openHABian version using Debian 11 before upgrading to openHAB 4.

This means if you have an OS based on Debian 10 ( buster ) - that is your version as you wrote - then you need to take care on your own to upgrade the OS or download a newer openhabian image ( ! ) and install that image. The upgrade from buster to bullseye is not done automatically by running openhabian-config.
The reason why you need bullseye is Java 17. If you go for Java based on Zulu it should work but other executables being installed by openhabian-config will not be compatible with bullseye libraries.

So you have two options:

  • install openhabian based on an image ( bullseye )
  • upgrade from buster to bullseye
1 Like

Okay. Thank you very much. Then I misunderstood the article.
I thought that the oh-config would take care of that.
Oh dear, this is getting more complicated for a rookie like me.
I had already tried the apt update and apt full-upgrade and they also failed.
I’ll try it again tomorrow and if it fails again, I’ll install it on a new SD card.
So thanks again for explaining.

with a specific error message ? You followed a specific guide on how to do this ?

I don’t know exactly. after a lot of error messages appeared and openhab no longer started, I used the backup SD again.
I suspect it is due to the expired repo key:
https://community.openhab.org/t/linux-repo-public-key-is-expiring-soon/147905
I read that later.
I’m currently making a new backup and will try again.
My Guide is here:
https://www.raspberrypi.com/documentation/computers/os.html#upgrading-from-previous-operating-system-versions
It sounds easy:

sudo apt update
sudo apt full-upgrade

and hope that the oh-config is still running and that I can start the update there
Or do you have a better suggestion?

I don’t see that the repository configuration ( /etc/apt/sources.list ) is touched in the documentation that you posted.

Have a look at e.g. How To Upgrade Raspberry Pi OS to Bullseye from Buster | Tom's Hardware it describes the steps and file that need to be modified.

Thank you very much. This looks more complete
I’ll try it later according to your instructions

unfortunately the apt update does not work:

openhabian@openHABianDevice:~ $ sudo apt update
OK:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Holen:2 http://davesteele.github.io/comitup/repo comitup InRelease [4.659 B]
OK:3 http://archive.raspberrypi.org/debian buster InRelease
Holen:4 https://deb.nodesource.com/node_12.x buster InRelease [4.584 B]
Holen:5 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease [12,8 kB]
Fehl:2 http://davesteele.github.io/comitup/repo comitup InRelease
  Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY 0959C4A3DCF89FBF
Fehl:5 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease
  Die folgenden Signaturen waren ungültig: EXPKEYSIG 075721F6A224060A openHAB Bintray Repositories <owner@openhab.org>
Es wurden 4.584 B in 3 s geholt (1.316 B/s).
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Aktualisierung für 117 Pakete verfügbar. Führen Sie »apt list --upgradable« aus, um sie anzuzeigen.
N: Datei »openhab.liste« in Verzeichnis »/etc/apt/sources.list.d/« wird ignoriert, da sie eine ungültige Dateinamen-Erweiterung hat.
W: Während der Überprüfung der Signatur trat ein Fehler auf. Das Depot wurde nicht aktualisiert und die vorherigen Indexdateien werden verwendet. GPG-Fehler: http://davesteele.github.io/comitup/repo comitup InRelease: Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY 0959C4A3DCF89FBF
W: Während der Überprüfung der Signatur trat ein Fehler auf. Das Depot wurde nicht aktualisiert und die vorherigen Indexdateien werden verwendet. GPG-Fehler: https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease: Die folgenden Signaturen waren ungültig: EXPKEYSIG 075721F6A224060A openHAB Bintray Repositories <owner@openhab.org>
W: Fehlschlag beim Holen von http://davesteele.github.io/comitup/repo/dists/comitup/InRelease Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY 0959C4A3DCF89FBF
W: Fehlschlag beim Holen von https://openhab.jfrog.io/artifactory/openhab-linuxpkg/dists/stable/InRelease Die folgenden Signaturen waren ungültig: EXPKEYSIG 075721F6A224060A openHAB Bintray Repositories <owner@openhab.org>
W: Einige Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder alte an ihrer Stelle benutzt.

Openhabian-config was updated first:

openHABian users

The latest version of openHABian will do this for you, just run sudo openhabian-config and update openHABian - each time you open the menu, openHABian will check the key’s expiry date and do this for you

  • do you have the ‘lastest’ version of openhabian-config ( you can check the version in the about section )
  • the openhab signature will be stored under /usr/share/keyrings. Check if it is already there
  • manual steps to get the key in place are described at Download openHAB | openHAB

Why don’t you just reinstall from scratch and import your old config as recommended ?

  • do you have the ‘lastest’ version of openhabian-config ( you can check the version in the about section )

I think so. Its from 12.12.23:

openHABian Configuration Tool — [openHAB3]{2023-12-12T18:59:04+01:00}(8e591be)
openHAB 3.4.2 - Release Build
  • the openhab signature will be stored under /usr/share/keyrings. Check if it is already there

There are two files.

-rw-r--r--   1 root root 2280 Dez 28 14:48 openhab.gpg
-rw-r--r--   1 root root 1233 Mai 29  2012 raspbian-archive-keyring.gpg

Are these okay?

That is not necessary. The specified gpg file is already there.

Why don’t you just reinstall from scratch and import your old config as recommended ?

I shy away from the effort of a basic installation. I honestly don’t know what is necessary again until I can start oh-config and import a backup. And I still don’t know whether everything is really in the backup? Bindigs, settings etc.

Read the link I gave. You’ve already put more time into this than doing that would have costed.
Plus, unlike an OS upgrade, it’s reversible/non-destructive.

Yes, correct, the file for openhab is there. Is it also referenced in /etc/apt/sources.list.d/openhab.list ?

I have tested this. It is definitely faster.
But…
I got a new DHCP IP address and can no longer log in to the console with my openhabian password.
The browser-based log shows some errors, but I attribute most of them to the wrong IP.