Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

Thank You, i almost despaired because I couldn´t get it running!

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.