Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

I posted here because I had the same bullseye issue and then I respond to your questions. Seems we don’t agree on who’s clogging who. Have a good day.

I believe this thread is very specific on RPI right? and you are asking for N2+ which is totally a different HW?

1 Like

You guys should read the thread. Someone posted an issue. I gave a solution. Someone gave an alternative solution. I said that was a good solution, but I also pointed out that the issue was arm specific, as arm boards don’t use grub. Then I was asked about the distro I used and pointed to it and pointed out it was N2+, and also indicate the guy that made the N2+ distro also makes distros for the PI. No question just information that could be useful for someone trying to install the latest release on an arm board, which includes all of the PIs. Along with an alternative distro build for PIs that could also be useful for people using PIs. Sorry I’ll make sure not to post a solution next time.

1 Like

Anyway this is a public forum and you should keep on helping others. I’m sorry if I offended you. But that is not my intentions. Its just this is already a very long thread and the informations might lost in the tangle.

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.