Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

Combine @bkprath and my solution:
TL;DR: Before starting the HA Supervised installation run these lines:

sudo echo "systemd.unified_cgroup_hierarchy=false" > /etc/default/grub
sudo sed -i -e "1 s/$/ systemd.unified_cgroup_hierarchy=false/" /boot/cmdline.txt
sudo reboot

If you are more cautious and do not trust random commands on the web:

  1. Add systemd.unified_cgroup_hierarchy=false to /etc/default/grub.
  2. Add systemd.unified_cgroup_hierarchy=false to the end of /boot/cmdline.txt.
  3. Reboot.

Explanation:
This will make sure the installer finds the desired value set for grub and carry on. Also the value is properly set and HA Supervised will run as expected.

It is the same behaviour compared to the installer which contains these lines in its postinst script:

[...]
# Switch to cgroup v1
if ! grep -q "systemd.unified_cgroup_hierarchy=false" /etc/default/grub; then
    info "Switching to cgroup v1"
    cp /etc/default/grub /etc/default/grub.bak
    sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="/&systemd.unified_cgroup_hierarchy=false /' /etc/default/grub
    update-grub
    touch /var/run/reboot-required
fi
[...]

Finally the Raspberrymatic add on, which requires cgroup support, is up and running again on my installation.

2 Likes

i have jumped a few versions up today and its painfull missing of hasc for exampleā€¦
all my config are mess!

is there some way to fix it at once? or shmtnā€¦

Not sure what your issue is. Are you saying you havenā€™t updated HA for some time and now have config issues?

If that is the case, that has nothing to do with this installation guide and Iā€™d recommend you go and read all of the breaking changes from each release you have skipped and fix.

1 Like

This is simpler and far more elegant than my approach was lol. I unpacked the deb file, commented out the offending lines, rebuilt and then installed my new deb :slight_smile:. I donā€™t use Raspberrymatic, though, and donā€™t feel the need to downgrade my cgroup version.

@kanga_who

Please add this to your guide. With the newest update, they have messed up the supervised installer, even on non raspiOS systems. It has to be done before Section 3 ā€“ Install Home Assistant Supervised

1: sudo echo "systemd.unified_cgroup_hierarchy=false" > /etc/default/grub
2: Reboot

1 Like

Can you please elaborate on this?

GRUB is not universal in the Linux world, but a bootloader for some specific hardware architectures.
The Raspberry Pi is an ARM device, which has its own firmware and bootloader not using GRUB.

The first stage bootloader is stored in ROM within the RPIā€™s system-on-chip. During the boot process it loads bootcode.bin from SD card/SSD drive which loads start.elf, which then loads config.txt, cmdline.txt and kernel.img.

Where does /etc/default/grub fits-in here? :thinking:

2 Likes

They made a mistake in the newest supervised deb file to check for that specific grub file and if not, halt the installation.

You can see it here:

The dummy grub file just tricks the installer to verify that it exists and continue :smiley:

3 Likes

Understood. Thank you for the enlightement :+1:t3:

Wondering though why the devs decided to check for that specific content (inside /etc/default/grub) when it is clear that i.e. the RPI (amongst others) does not use GRUB :crazy_face:

1 Like

Hi . Iā€™m getting the following error: -bash: /etc/default/grub: Permission denied .

Any ideas?

are you running as root/sudo?

Yes, and Iā€™m on a raspberry. the /etc/default/grub does not exist.

what OS are you running?

Raspbian GNU/Linux 11 (bullseye)

Look at the title of this thread. It states ā€¦with Debian 11

The instructions in this thread are for Debian Linux 11 aka Bullseye (no derivatives).

Raspbian GNU/Linux 11 is a derivative.

on raspbian/raspiOS you should use

sudo sed -i 's/$/systemd.unified_cgroup_hierarchy=false/' /boot/cmdline.txt

But as @Tamsy says, this guide is ONLY for vanilla Debian 11, not Raspbian, raspiOS or any other derivatives.

Run sudo -i first and then sudo echo "systemd.unified_cgroup_hierarchy=false" > /etc/default/grub

1 Like

I have been using HA Supervised on a Pi 4 with Raspberry OS for about a year now since Buster which was just beta in itā€™s 64-bit form back then and it was quite easy and has been super stableā€¦ Given that 64-bit is now a stable release I re-installed everything recently using Bullseye and again, super easy, shows as a suported installation, stable, etc.

I was wondering, what is the benefit is using pure Debian on a Pi vs Raspberry OS? Is it just a personal preference thing?

Iā€™m using Debian 11 and Iā€™m getting this in the journal on Raspberry Pi 2:

May 06 08:46:03 hass-home 5c21135d7e79[440]: 22-05-06 10:46:03 INFO (SyncWorker_1) [supervisor.docker.interface] No version found for ghcr.io/home-assistant/armv7-hassio-cli
May 06 08:46:03 hass-home hassio-supervisor[652]: 22-05-06 10:46:03 INFO (SyncWorker_1) [supervisor.docker.interface] No version found for ghcr.io/home-assistant/armv7-hassio-cli
May 06 08:46:03 hass-home 5c21135d7e79[440]: 22-05-06 10:46:03 INFO (MainThread) [supervisor.plugins.cli] No cli plugin Docker image ghcr.io/home-assistant/armv7-hassio-cli found.
May 06 08:46:03 hass-home hassio-supervisor[652]: 22-05-06 10:46:03 INFO (MainThread) [supervisor.plugins.cli] No cli plugin Docker image ghcr.io/home-assistant/armv7-hassio-cli found.
May 06 08:46:03 hass-home hassio-supervisor[652]: 22-05-06 10:46:03 INFO (MainThread) [supervisor.plugins.cli] Running setup for CLI plugin
May 06 08:46:03 hass-home 5c21135d7e79[440]: 22-05-06 10:46:03 INFO (MainThread) [supervisor.plugins.cli] Running setup for CLI plugin
May 06 08:46:03 hass-home hassio-supervisor[652]: 22-05-06 10:46:03 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
May 06 08:46:03 hass-home 5c21135d7e79[440]: 22-05-06 10:46:03 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
May 06 08:46:03 hass-home 5c21135d7e79[440]: 22-05-06 10:46:03 WARNING (MainThread) [supervisor.updater] Can't fetch versions from https://version.home-assistant.io/stable.json: [Errno 104] Connection reset by peer
May 06 08:46:03 hass-home hassio-supervisor[652]: 22-05-06 10:46:03 WARNING (MainThread) [supervisor.updater] Can't fetch versions from https://version.home-assistant.io/stable.json: [Errno 104] Connection reset by peer
May 06 08:46:03 hass-home hassio-supervisor[652]: 22-05-06 10:46:03 WARNING (MainThread) [supervisor.plugins.cli] Error on install cli plugin. Retry in 30sec
May 06 08:46:03 hass-home 5c21135d7e79[440]: 22-05-06 10:46:03 WARNING (MainThread) [supervisor.plugins.cli] Error on install cli plugin. Retry in 30sec
root@hass-home:~# docker container ls
CONTAINER ID   IMAGE                                            COMMAND   CREATED          STATUS          PORTS     NAMES
5c21135d7e79   ghcr.io/home-assistant/armv7-hassio-supervisor   "/init"   32 minutes ago   Up 10 minutes             hassio_supervisor

root@hass-home:~# docker images
REPOSITORY                                       TAG         IMAGE ID       CREATED      SIZE
ghcr.io/home-assistant/armv7-hassio-supervisor   2022.05.0   5315bf939617   3 days ago   276MB
ghcr.io/home-assistant/armv7-hassio-supervisor   latest      5315bf939617   3 days ago   276MB

It used to work a few months agoā€¦

You might find the anser here.

Make sure you have also disabled avahi-daemon, take a look here.

But I donā€™t have any connectivity issue, dns works fine and I can ping www.google.com from the pi.
The only weird thing Iā€™ve noticed is that after installing homeassistant-supervised.deb the system boots with an ip address and later changes to a different one.

avahi-daemon is not even installed.

Iā€™ve also noticed that if I manually

docker pull ghcr.io/home-assistant/armv7-hassio-cli:2022.05.0
docker pull ghcr.io/home-assistant/armv7-hassio-cli:latest

then it works, but that means I will have to do so for each and every image (next it wonā€™t find hassio-dns etc):

[supervisor.docker.interface] No version found for ghcr.io/home-assistant/armv7-hassio-dns

I could manually pull each and every image, but I really want to go at the bottom of the issue and fix it because clearly somethingā€™s wrong.