Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

Hi everyone,
I have had HQ supervised setup on my Raspberry Pi 4 Model B (2018) a couple of times but then on the unsupported Raspberry Pi OS.
Now I tried to follow this guide so that I could get it on a supported version.
I get all the way through by following this guide until this step:

dpkg -i homeassistant-supervised.deb

This is my OS version I’m running.

root@rpi4-20230612:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

I get this error:

root@rpi4-20230612:~# dpkg -i homeassistant-supervised.deb
(Reading database ... 30933 files and directories currently installed.)
Preparing to unpack homeassistant-supervised.deb ...
[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
[warn] ModemManager service is enabled. This might cause issue when using serial devices.
Leaving 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Leaving 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Leaving 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Leaving 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.5.0) over (1.5.0) ...
dpkg: dependency problems prevent configuration of homeassistant-supervised:
 homeassistant-supervised depends on systemd-resolved; however:
  Package systemd-resolved is not installed.

dpkg: error processing package homeassistant-supervised (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 homeassistant-supervised

I can’t really understand what is wrong and have now search the internet far and wide without finding the answer. I’ve worked with linux a bit but is absolutely not an expert. My initial thought was that the package needed to be installed but it didn’t work since it seems to be outdated. I tried to fix broken install and I tried to install it again but nothing worked. Then I found a thread about needing the Debian 12 OS and not Debian 11 (as the initial post said) so I redid the whole process with the Debian 12 OS instead but nothing changed. I have the exact same problem.
I guess some of you guys might just see directly what is wrong but I can’t figure it out. Someone said they had the same problem when they chose the wrong install for your kernel but I’m pretty sure I should use the aarch64 distribution with the Raspberry Pi 4 that I have (please tell me if I’m wrong). I used this distro: https://raspi.debian.net/tested/20230612_raspi_4_bookworm.img.xz
I used this OS agent: https://github.com/home-assistant/os-agent/releases/download/1.5.1/os-agent_1.5.1_linux_aarch64.deb

that is the problem. If you install that package it will be good

Then this isn’t the right install method for you. The requirements are clear that you should be an expert to use this.

I am getting the same problem as @bivonblast with:
“Unpacking homeassistant-supervised (1.5.0) …
dpkg: dependency problems prevent configuration of homeassistant-supervised:
homeassistant-supervised depends on systemd-resolved; however:
Package systemd-resolved is not installed.”

If I try to install systemd-resolved as suggested by @DavidFW1960 I get:
"Package systemd-resolved is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘systemd-resolved’ has no installation candidate"

@bivonblast FYI - you have installed Debian 12 (bookworm), these instructions are for Debian 11 (bullseye)

Slightly outdated as Debian 12 is the only supported OS atm. :point_left:

Also your link THERE shows a old (2020-06-03) version of the doc which suggest Debian 10 is the latest and greatest :face_with_hand_over_mouth:

@orange-assistant Actually your statement is almost but not 100% accurate:

Note I am on 11, Healthy and Supported. The link you supplied is dated June 3rd, and also includes this statement:

“Only the above-listed version of Debian Linux is supported for running this installation method. When a new major version of Debian is released, the previous major version is dropped, with a deprecation time of 4 months. An exception to this rule occurs if the new version does not meet the requirements of the Supervisor.”

Being an old wise soul, I must say I used to jump at every new update and learned the hard way to let others break things in, instead of giving myself headaches. Leading edge is great, but not bleeding edge! So, I am going to relax for 3 1/2 months and let everyone else hammer out whatever wrinkles there might be (and maybe none) - and then move over when needed.

1 Like

Any suggestions on why this problem is occurring? Thanks.

From reading various posts, there seems a problem with the latest version of Home Assistant Supervised. I tried v1.4.3 and it worked.

Will this guide be updated for Deb 12 any time soon? I’m reluctant doing a dist upgrade now.

I’d just go with Debian 11 and then when you need to go to 12 - backup - then upgrade in place - and backup again. It’s still supported for 3+ more months

What’s the rush to get on Deb 12? Is your system working? I’d assume it is therefore you have no need to update this very second.

I’ll get the guide updated when my work allows me some downtime, in the meantime Deb 11 is still supported so you don’t need to upgrade.

2 Likes

“When a new major version of Debian is released, the previous major version is dropped, with a deprecation time of 4 months”

Debian 11 will still be treated as supported for another 2-3 months.

1 Like

No rush, just asking :wink:

That’s very correct, still as this is a tutorial for a new installation it’s rather not smart (future proof) to install an old OS which will be unsupported in HA within less than 10 weeks from now :man_shrugging:

Better just directly install HA supervisor on Debian 12 as it is available and stable - it is not more work/time consuming but will allow the HA installation to be supported probably till somewhere middle/end 2025 :confetti_ball:

2 Likes

For those who want to upgrade from Debian 11 (bullseye) to Debian 12 (bookworm) without starting from scratch, here comes how it can be done (successfully tested on RPI4 and amd64).

:information_source: This upgrade guide works also on the amd64-architecture. It is not exclusive to the RPI.


:warning: This upgrade guide is exclusively for upgrading Debian 11 (bullseye) to Debian 12 (bookworm).
If you have a Debian derivative such as Raspberry Pi OS or Ubuntu installed the upgrade will fail and you will get an Unsupported and “Unhealthy” system. DO NOT post in this thread about your OS not being supported, you must run Debian, not a derivative.

:information_source: “A Debian derivative is a distribution that is based on the work done in Debian but has its own identity, goals and audience and is created by an entity that is independent from Debian. Derivatives modify Debian to achieve the goals they set for themselves.” (Source: Debian -- Debian derivatives).


:stop_sign: Before proceeding, please read the following information :stop_sign:

Make sure you have a recent full backup of your Home Assistant ready just in case something goes wrong. Since this guide is about upgrading the operating system itself it is wise to keep a copy of that backup not only on the HA device you are going to upgrade. I am not responsible for any data loss which might occur. Please do some research if you have any concerns about upgrading the OS before following this guide!

This upgrade guide is considered advanced and should only be used if one is an expert in managing a Linux operating system, Docker and networking!


:warning: Do yourself (and the supporting community here) a favor and refrain from executing the following commands as the system’s root user. Doing so can lead to all kinds of hard to find errors and the upgrade will eventually fail.

Run the commands to upgrade your system as the unprivileged user you created when initially building your system. Prepend sudo to all of the selected commands instead as shown within this upgrade guide to get temporary root-access when needed only.


Make sure all packages on your Debian 11 OS have the latest versions installed.
Execute from the CLI:

sudo apt update && apt upgrade -y && apt autoremove -y

:exclamation: In case the kernel has been upgraded with the above command or you see the recommendation to reboot the host you should reboot the system before continuing with this guide.

Also make sure you have the latest HA-Version, Supervisor-Version and OS Agent installed.
At the time of this writing/latest edit this is:

  • HA-Version: core-2024.10.3
  • Supervisor-Version: supervisor-2024.10.2
  • Agent-Version: 1.6.0

Now do from the console as an unprivileged user (not root) :

sudo sed -i 's/bullseye/bookworm/' /etc/apt/sources.list
sudo sed -i 's/bullseye/bookworm/' /etc/apt/sources.list.d/*.list
sudo sed -i 's|bookworm/updates|bookworm-security|' /etc/apt/sources.list

Continue with the OS upgrade:

sudo apt update

Only if you see the following error message after “sudo apt update”:

The value 'bullseye' is invalid for APT::Default-Release as such a release is not available in the sources

Run:

sudo sed -i 's/bullseye/bookworm/' /etc/apt/apt.conf

and again:

sudo apt update

Now upgrade your existing packages without adding any new packages to the upgrade process:

sudo apt upgrade --without-new-pkgs -y

:exclamation: The above command will take some time. Be patient.

:exclamation: If asked whether the installer should automatically restart certain services during the upgrade choose “yes”.

Now do the final upgrade to Debian 12 (bookworm) by executing the following command:

sudo apt full-upgrade -y

:exclamation: The above command will take even longer and sometimes feels like the process has stalled, especially when it has reached:

Checking for services that may need to be restarted...
Checking init scripts...

Just be patient and don’t interrupt the upgrade process but let it work in the background. As mentioned above this will take quite a while.

When the process has finally finished it is time to reboot your RPI:

sudo reboot

or (depending on the system architecture):

sudo systemctl reboot

After the system has rebooted go back to the CLI and check the version number of the OS by executing the lsb_release and cat commands:

sudo lsb_release -a
sudo cat /etc/debian_version

It should show:

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

and

12.7

With the Debian 12 upgrade finally complete, remove any unwanted packages that might have carried over from the previous OS installation. Run:

sudo apt --purge autoremove -y

Make sure all installed packages are up-to-date:

sudo apt list --upgradable

If there are upgradable packages available execute:

sudo apt update && apt upgrade -y && apt autoremove -y

to upgrade those packages.

:exclamation: If asked about whether to keep locally modified configuration files always choose:

"Keep the local version currently installed"

Most probably also the kernel got upgraded. Thus you have to reboot the system:

sudo systemctl reboot

After the system is up and running again execute:

sudo apt-get install udisks2 wget

Check whether systemd-journal-remote is installed:

sudo dpkg -s systemd-journal-remote

The output should contain:

Version: 252.30-1~deb12u2
Depends: libc6 (>= 2.34), libcurl4 (>= 7.16.2), libmicrohttpd12 (>= 0.9.50), libsystemd-shared (= 252.30-1~deb12u2), systemd

If systemd-journal-remote is not installed run:

sudo apt install systemd-journal-remote -y

In case the version on your RPI shows < Version: 252.17-1 run:

sudo apt-get install --reinstall systemd-journal-remote

:warning: About systemd-resolved which is needed by HA Supervised:

The new systemd-resolved package will not be installed automatically on upgrades. You need to install the new package manually!

Note that until systemd-resolved has been (re-)installed, DNS resolution might no longer work since the service will not be present on the system.

Installing this package will automatically give systemd-resolved control over /etc/resolv.conf. If you don’t want this, follow this post to regain control over /etc/resolv.conf after you have completed the following steps:

Check whether systemd-resolved is correctly installed:

dpkg -s  systemd-resolved

The output should contain:

Version: 252.30-1~deb12u2
Replaces: resolvconf, systemd (<< 251.3-2~)
Provides: resolvconf

In case systemd-resolved is not installed run:

sudo apt-get install systemd-resolved

:exclamation: If the system complains about certain unfulfilled dependencies while installing systemd-resolved just hit “y

It is time now to restart the host system once again:

sudo systemctl reboot

All done. Your HA Supervised should now run on Debian 12 (bookworm) and shows similar to:

:exclamation: In case you are still seeing the status “Unsupported” and/or “Unhealthy” at this point, re-run the “supervised-installer”:

cd /usr/local/src
sudo rm -f homeassistant-supervised.deb
sudo wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
sudo dpkg -i homeassistant-supervised.deb

:information_source: You may be prompted to choose a machine type during the installation process. If so, choose raspberrypi4-64 if you do the upgrade on a RPI4 64bit.

Now reboot the host once again.

:exclamation: If you are you are presented with the following message after the host reboot:

Unsupported system - CGroup version

Execute the following command through CLI:

sudo sed -i.bak 's/$/ systemd.unified_cgroup_hierarchy=0/' /boot/firmware/cmdline.txt

and reboot.

The above command will also take care of writing a backup of the original file (/boot/firmware/cmdline.txt.bak) just in case something goes wrong.


Addendum (12 Oct. 2024):

Since some users have run into DNS issues (i.e. “lookup ghcr.io: no such host”) here come the steps on how to resolve those issues:

Find your active interface using the CLI:

sudo nmcli con show --active

The output shows something similar to:

NAME             UUID                                  TYPE      DEVICE 
Supervisor eno1  e874k675-44d4-31a4-8cf8-3b8cc5f3b7cb  ethernet  eno1   
lo               1e5bf4e3-e5c6-40d4-a193-0ffaa1l4fd2b  loopback  lo

where

e874k675-44d4-31a4-8cf8-3b8cc5f3b7cb

is the active interface of my RPI4 used by Supervisor.

Now run the following command but use the UUID of your active interface:

sudo nmcli con mod "e874k675-44d4-31a4-8cf8-3b8cc5f3b7cb" ipv4.dns "8.8.8.8, 8.8.4.4"

With the above command you configure the RPI to resolve TLD’s using Google’s DNS servers (8.8.8.8 and 8.8.4.4). Of course you can change this to whatever valid DNS-servers of your choice.

Restart the NetworkManager service:

sudo systemctl restart NetworkManager

OR (if the above does not lead to working DNS services):

Open/edit file /etc/gai.conf

Find line:
#precedence ::ffff:0:0/96 100

and uncomment it:
precedence ::ffff:0:0/96 100

to prioritise IPv4 over IPv6.

Save /etc/gai.conf and reboot the host:

sudo systemctl reboot


(Upgrade guide last updated/revised: 25 Oct. 2024)

21 Likes

My apologies for not rushing to the forums and updating the guide before now. I should have taken time away from running my business to do so.

Fortunately, @tamsy has helped out and made the necessary changes.

3 Likes

No worries - no need to pause your business. The community is here to assist :wink:

As a side note there are also other programs which respect users privacy doesn’t include tracking/analytics and doesn’t come in a bundle as adware. :arrow_backward:

When omitting the code for tracking/analytics/ads and other unnecessary code a program that writes images to flash and validates it can be as small as 300 kb (with gui) instead of the balenaMonster which by now probably grown over half a gigabyte (500 mb) with dependences and therfor is around 99% bigger than needed. Also etcher is build on EOL sofware which doesn’t even receives critical fixes anymore. :boom:

Last thought: Why download ~500mb of software to write a ~250mb HaOS image? What a waste of resources! :man_facepalming:

Out of curiosity:

Wondering where the other ~350mb’s have gone to :thinking:

1 Like

emphasis on “with dependencies:point_down:

a detail look :eyes:

Comparison

Description balenaEtcher WIN32 Disk Imager USBImager
Multiplatform :heavy_check_mark: :heavy_check_mark:
Minimum Windows Win 7 Win XP Win XP
Minimum MacOSX (1) 10.15 10.10
Available on Raspbian :heavy_check_mark:
Program size (2) 130 Mb 300 Kb
Dependencies lots, ~300 Mb Qt, ~8 Mb ✗ none

You need to sum-up the program size (now 148MB from your screenshot) together with the dependencies (typically downloaded in the background for your convenience)

But the size shouldn’t be a big problem for many, rather the ads/trackers which are included as well building on a obsolete/eol software stack are the big red marks :stop_sign:

I wrote the guide, I like using Etcher so I linked it.

If you or anyone else wishes to use an alternative, feel free to do so.