Installing Home Assistant Supervised using Debian 12

The problem occurs when HA fails so that not even the ssh addon starts. It is really useful to get to the underlying OS to restart docker, or the supervisor. Commandline access to docker is really important to me.

But you can do that in HAOS by activating the OS level SSH on port 22222 or on supervised by simply installing openssh-server. The installation of openssh-server within debian seems to have no effect on whether the supervisor thinks you are “unhealthy” or “unsupported”.

N

4 Likes

Exactly that :wink:

1 Like

Thanks for that piece of information.

Hello,

I installed it according to the instructions but I have the following problem.
The home screen is opened but after 3-4 minutes it was not possible to open it.
I installed portainer and I checked the logs

This is the output, can you somehow help me ?

/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/fix-attrs: line 13: can't create /dev/null: Read-only file system
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/cont-init: line 12: can't create /dev/null: Read-only file system
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/services-up: line 19: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
s6-rc: info: service legacy-services successfully started
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/cont-finish: line 14: can't create /dev/null: Read-only file system
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-supervise s6-linux-init-shutdownd: warning: unable to open /dev/null for writing: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/fix-attrs: line 13: can't create /dev/null: Read-only file system
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/cont-init: line 12: can't create /dev/null: Read-only file system
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
/package/admin/s6-overlay-3.1.5.0/etc/s6-rc/scripts/services-up: line 19: can't create /dev/null: Read-only file system
/command/printcontenv: line 16: can't create /dev/null: Read-only file system
s6-rc: info: service legacy-services successfully started
/command/printcontenv: line 16: can't create /dev/null: Read-only file system

My setup
RPI 3 + Booting from SSD
Installed Debian and Docker

If the file exists check if

sudo chmod 666 /dev/null
sudo chown root:root /dev/null

will do.
If it not exists create it and set ownership with the following commands

sudo mknod -m 666 /dev/null c 1 3
sudo chown root:root /dev/null

@Joerg
Did not help

Let us see the output of

sudo ls -al /dev/null

@Joerg
Output of

sudo ls -al /dev/null

is following result

-rw-r--r-- 1 root root 46 Sep 10 15:05 /dev/null

It’s shown as a regular fle,
-rw-r--r--
output should be with a “c” in front and write rights for everyone:

crw-rw-rw- 1 root root 1, 3 12. Aug 13:07 /dev/null

Did you create it as a (normal) file? If so remove it and recreate it as I showed above:

sudo mknod -m 666 /dev/null c 1 3
sudo chown root:root /dev/null

@Joerg

  1. Deleted
  2. Recreated
  3. Check result of
sudo ls -al /dev/null

Result:

crw-rw-rw- 1 root root 1, 3 Sep 10 15:42 /dev/null
  1. Checked if the home assistant is working
  • YES, it is working
  1. Reboot RPI
sudo reboot
  1. Check result of
sudo ls -al /dev/null

Result:

-rw-r--r-- 1 root root 46 Sep 10 15:48 /dev/null
  1. Checked if the home assistant is working
  • NO, it is not working

Yeah, I feared so. There are reports that this happens after a reboot.
I don’t have a solution for that behaviour yet, sorry.

What you can try is

sudo mount -o remount, rw /
sudo rm /dev/null
sudo mknod -m 666 /dev/null c 1 3
sudo chown root:root /dev/null

and check if it makes a difference, but I do not believe it.

A workaround would be to put this sequence in a script and execute it right after the RPI has booted.
But as said, that’s only a workaround.

Check if the filesystem of the SSD has errors.

Not working after restart :frowning:

I tried as a workaround create the following bash file

restart.sh

sudo mount -o remount, rw /
sudo rm /dev/null
sudo mknod -m 666 /dev/null c 1 3
sudo chown root:root /dev/null
sudo docker restart b94d0cdbe6e5

It worked if I run it from command line but,

I tried add it to crontab but it is not working
sudo crontab -e

@reboot sleep 180 && /home/pi/reboot/restart.sh

Some ideas what is wrong?

Not really, I guess it has the excute ‘x’ flag?
Put

SHELL=/bin/sh

on top of the script, if this does not help check out this and this.

Hi.

I am running this guide and when I run the command “curl -fsSL get.docker.com | sh” it returns “curl: (6) Could not resolve host: get.docker.com

I did a fresh install of Debian 12 that was linked above. Adn my NetworkManager.conf looks like this:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

Could be related to to this. Check also my other post here.

Question. “Add DNS server of your choice”. I have no idea what my DNS should be. Is there any standard?

I had Debian 11 running with HA supervised (ran this guide a while ago) without any issues. Unfortunately I had a system failure so needed to reinstall everything. I did not run into this problem at that time.

If in doubt set the local ip-address of your DHCP server (usually your router’s ip address) here.

A list of public DNS servers can be found here or a more extensive list is here (amongst many other lists).

As for Debian 12 (bookworm):

“The new systemd-resolved package will not be installed automatically on upgrades. You need to install the new package manually. Note that until it has been installed, DNS resolution might no longer work since the service will not be present on the system.” (More about the latter here)

1 Like