Need to upgrade to Debian 11 from Mint

I am looking for guidance on the best way to upgrade to a good version for OpenHAB. The computer is exclusively used for this purpose and I am anxious to keep my working system…working! Please help me get upgraded to the right versions. I am technically competent but not well versed in Linux.

Thanks in advance for any/all help.

Why are you upgrading?
What are you upgrading?
What are you upgrading from?
what are you upgrading to?

You are only upgrading Linux, why?
Are you upgrading OH?

My guess from the context of your message is you’re upgrading Linux

Are you using, or wanting to use anything else on this computer?
Is there a problem with your computer?
Is there a problem with OH?

If the answer to the last 3 question is no, you have no reason to upgrade Linux other than installing the latest security updates, not to a new version

Linux distros are not interchangeable. To move from Mint to Debian would be like moving from Windows to Linux. You have to reinstall the OS from scratch.

So, in short, an in place “upgrade” isn’t going to be an option. You either need to stick with Mint (there’s nothing wrong with Mint BTW) or reinstall everything from scratch starting with Debian 11.

Since you mention this machine is dedicated to openHAB, I will second @smitopher’s recommendations. Unless there is something compelling you to move to Debian I recommend sticking with Mint. Mint is down stream from Ubuntu which itself is down stream from Debian so there is very little that works in Debian that won’t work in Mint and most things work the same.

I am not at all unhappy with Mint. But Openhab config is fussing about the release (i brought Mint current) and says it is not supported and I should therefore not continue. This worried me…hence the move to Debian which it recommended. This is running on a standalone laptop. Nothing is wrong, just trying to stay current.

As always, I am appreciative for any guidance.

Show the message you are seeing. I’m unaware of any checks anywhere in openHAB that cares anything about the operating system you are running.

However, if you are running openHABian (which may or may not work well, it’s known not to work well with Ubuntu) I would expect you might see a message like that.

More importantly though, OH 5 requires a 64-bit operating system mainly because there are no official builds of Java 21 for 32-bit operating systems. If you are in fact running a 32-bit operating system, you will have to reinstall the OS to upgrade.

I confirmed it is 64 bit

OK, so this message is in deed coming from openHABian and not openHAB. It’s important to understand the difference.

  • openHAB: a Java based program which integrates and allows control and automation of hundreds of home automation technologies
  • openHABian: a collection of shell scripts that configures the operating system and makes the installation of openHAB and other third party software services (e.g. Mosquitto for MQTT)

Your error message is coming from openHABian and yes, openHABian is known not to work with Ubuntu. Since Mint is downstream from Ubuntu it’s not surprising that openHABian doesn’t work with it too. But that doesn’t mean openHAB doesn’t work. It’s just these convenience scripts in openHABian that do not work.

So your choice is to abandon openHABian which means you’ll need to manually do most of the work setting up and updating your system or reinstall everything from the operating system on up using64-bit Debian as the base, then installing openHABian using the manual instructions, and finally restoring your backed up configs from your current Mint install.

Given that your system is already up and running and likely configured as you want it to be, abandoning openHABian at this point may not have that much of an impact over all. It just means you’ll need to do upgrades/updates using apt update and apt upgrade on the command line instead of through openhabian-config.When changing to a new major version of OH you’ll need to install the needed Java as well (in the case of OH 5 you need Java 21).

So your decision really comes down to doing a lot of work right now basically starting over from scratch with a new OS (your config is fine, you don’t need to redo your Items and Things and Rules and such) and save a little bit of work going forward, or save a lot of work now and need to spend a little more work maintaining and paying attention to the release notes going forward.

I can’t make that choice for you. Either choice is reasonable.

1 Like

Thank you for taking the time explain my options. Since I use my install to handle my greenhouse and home security/automation (and I am very pleased with how it performs), I am hesitant to go back to ground zero right now. I don’t mind doing manual updates. Is it really as simple as apt update/ apt upgrade? Can you give me some guidance on how to know about necessary Java updates and the best way to do them?

Again, as always, I very much appreciate the support.

Yes, at least until it isn’t. Note this command updates everything on your machine, not just openHAB.

Remember to keep an eye on the announcements for when a new OH release is made (mid July and mid December) for details. For example, when moving from OH 4 to OH 5 you have to manually install a new Java before running apt upgrade. Otherwise, the upgrade will fail because OH will not see the version of Java it requires.

This will always be discussed in the release announcement. For example, the release announcement for OH 5 states:

The required minimal Java version has been updated from Java 17 to Java 21. Make sure you have a suitable JVM installed. This change effectively drops support for 32-bit ARM OSes.

That post also links to a list of changes which has an upgrade process section where it’s further discussed with specific steps you need to take. You should always review this before upgrading so you are not surprised when something breaks after an upgrade and you know what to do.

When you see notes that say you need to change Java versions in the announcement, you can also always find links and instructions for how to install it at Installation Overview | openHAB.

1 Like

Looking at the documentation. Checked for the keyring (it is there). Looks like I do this:

APT (Debian / Ubuntu and derivatives)

Make sure that openHAB is sourced from the latest location, has the correct GPG signing key and that your system can download .deb packages via HTTPS by following the instructions for a stable installation in the docs.

If the above is correct, simply upgrade by using:

sudo apt-get update
sudo apt-get upgrade

Is this correct? I do not see any specific instructions relative to Java. Perhaps I missed it?

Please advise,

If you are not doing a OH upgrade, that’t it
If you are doing an OH Major upgrade, like to from 4.x to 5.x
You need to check if you need a New Java,
like OH 4.x required Java 17
OH 5.x requires Java 21
install the required Java BEFORE apt upgrade

to check your installed Java

java -version

To install Java 21 on Mint

sudo apt update
sudo apt install openjdk-21-jre

I am at 17. If I go to 21, will that break my current install? i was thinking of doing the Java jump tonight and do the move to 5.0 tomorrow.

As always, I appreciate your help.

It SHOULD be fine… but I would install Java 21 just before you upgrade OH

Advice will be followed! Tomorrow it is. I’ll use the instructions to first to java, then the aforemented “sudo apt-get update”, “sudo apt-get upgrade”. Any rough idea of how long each will take? (Need to plan since this is a production system)

With appreciation,

First step is do a full backup of OpenHAB
Should be less than 15 minutes
Install Java 21 Less than 5 minutes
apt upgrade less than 20 minutes
Reboot

Success! I am now on 5.0 and all seems to be fine, except for my connection to my Amazon account, which is still not connecting. I have launched the servlet and it fails to authenticate, even though the credentials are correct. This problem arose before the upgrade, which is part of the reason I wanted to make sure I was current. It isn’t mission critical but I would like to fix it.

1 Like

Seems to be a mainanance issue on Amazon side, was also reported in another topic.