Installing Home Assistant Supervised using Debian 12

I need much more control over the base OS. My hands are tied with ha-cli. It’s too much to bear with. Also, non-supervised is a no-no, since can’t add community add-ons for some reason, regardless of how I install HA with HAOS

Well, while I was starting to feel comfortable with Home Assistant and I liked it, because of these issues I have started looking for alternatives today. It’s regrettable, I am not 100% ready to leave, depends on what alternatives I may find.

With what specifically, and why? Running a HA OS VM along side other LXC or VMs is easy to manage and keeps HA isolated from issues from other things you may be trying to do.

2 Likes

Let me give you an example. I have HA in a VM and some log fills the data partition badly, blocking any move. I extended the disk from proxmox and booted with an utility “CD-ROM” and extended the data partition and now all I am getting is a boot loop. I have no clue where to look and how to troubleshoot this in a closed box OS. Happy? I have backups, I can reinstall and restore the config in minutes, but I can’t restore each time honestly.

image

This is all I see in the console. Any ideas please @kanga_who ?

We are probably getting a little off topic and should move this over a Proxmox thread.

Then address this issue.

I have run a HA OS VM in Proxmox for a couple of years now, I don’t have this issue. If it’s the HA logs files, not sure as you haven’t been specific, you can help to reduce the amount of logging by changing your recorder config in configuration.yaml to something like this (edit as you need).

recorder:
  db_url: !secret maria_db
  purge_keep_days: 7
  include:
    domains:
      - sensor
      - binary_sensor
      - switch
      - light
      - device_tracker
      - vacuum
      - group
      - input_boolean
      - cover
      - person
      - counter
      - timer
      - climate
      - lock
      - fan
  exclude:
    event_types:
      - service_removed
      - service_executed
      - platform_discovered
      - homeassistant_start
      - homeassistant_stop
      - feedreader
      - service_registered
      - call_service
      - component_loaded
      - logbook_entry
      - system_log_event
      - automation_triggered
      - script_started
      - timer_out_of_sync

If it’s a logging issue in Proxmox, then do some reading up on that and look for a fix.

It would guess you have done something in error during this process if you are getting a boot loop. Trash the VM and start again. If you haven’t already, you could take a look here for some pointers.

1 Like

I appreciate the effort and thank you for the pointers. The goal was not going off topic but I was requested some reasons

Try my fixed script for i386 netbook:
Shortly. It is to fire up Supervised installation that will have common updates on Debian 11 i386 netinst distro even without any GUI via SSH.

sudo apt install software-properties-common python3.9 python3.9-dev python3.9-venv python3-pip libffi-dev libssl-dev
sudo apt autoremove -y 
export PATH=$PATH:/usr/sbin

sudo apt install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat bash 

systemctl disable ModemManager 
systemctl stop ModemManager 

sudo apt install -y docker.io

sudo apt install wget unzip udisks2
wget https://github.com/xvrfr/homeassistant/raw/main/os-agent_1.2.2_linux_i386.deb
sudo dpkg -i os-agent_1.2.2_linux_i386.deb

wget https://github.com/xvrfr/homeassistant/raw/main/supervised-installer.fixed.sh
chmod 777 supervised-installer.fixed.sh
sudo ./supervised-installer.fixed.sh

All dependencies are original non-modified except installer script. Modification of Kanga-who’s script had to be implemented because services files’ and cli download links now give 404 error.

On the other hand, if you have gui then try homeassistant-supervised.deb which should ask you for machine-arch. Choose qemux86.

I don’t know the way to pass machine parameter to deb via dpkg installation not to get its post-installatuon scripts error. That’s why I used fixed installation script.

(read with google translate or ask here for more help)

Run this on the host

echo "kernel.dmesg_restrict=0" >> /etc/sysctl.conf
sysctl -p
4 Likes

What for? It is the same even before appending… Or that post wasn’t for me?)

Hi All,

Is there a way to create an entire image of my SSD that contains Debian & Home Assistant? For my Windows machines I use the excellent Macrium Reflect, I have created a USB rescue stick that allows me to boot from this and either create an image to an external HDD or restore an image from an external HDD. I’d like to make make regular backups of my HA machine as I do with my Windows machines, in case of a failure it would be easier to restore an image rather than have to completely reinstall Debian from scratch then Home Assistant and restore a backup that I make and store on my NAS.

Just curious if anyone else does this?

There is no real need to do this when installing Debian and restoring a backup of HA can be done in about 20mins.

Keep regular backups of HA and in the unlikely event your SSD fails, reinstall Debian and restore HA.

I hear you,

I was just trying to make it a little easier, I have images of all my other machines so I figured why not do the same with my HA machine

For the time it takes your Pi and HA offline, image the disk and so on, it seems a little pointless when it’s so quick to reinstall and the chances of needing to do it when using an SSD is very low.

If it saves time having to configure/set up Debian then why not image it? Network settings, users, permissions, changed repositories, etc. Now, if you load up a Proxmox VE box, the built in backups/snapshots of VMs and containers are a thing of beauty and virtually eliminate the need for images.

1 Like

If you think the time spent doing this regularly enough (weekly/monthly) to have a recent working back up is time better spent than 20-30mins every ~2 years if an SSD fails, then go nuts.

In the time span an SSD should and will last, you will most likely move to another machine making the imaging redundant.

Still having this issue:

Error response from daemon: Get “https://registry-1.docker.io/v2/”: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:60704->[::1]:53: read: connection refused
dpkg: error processing package homeassistant-supervised (–install):
installed homeassistant-supervised package post-installation script subprocess returned error exit status 1

Already disabled IPv6, but still no go…
Anyone having any suggestions??

Maybe @RVital’s workaround helps?

Add to /etc/hosts:

140.82.121.34 ghcr.io
185.199.108.154 pkg-containers.githubusercontent.com

Tried it with

140.82.121.34 ghcr.io

But seems to be an issue with dns in relation with IPv6

tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:60704->[::1]:53:

And now that i look at it…maybe add
registry-1.docker.io ??

At last…

34.203.135.183  registry-1.docker.io
140.82.121.34 ghcr.io

Stared at it for a couple of days, searched for a solution a couple of days, but answer was right in front of me the whole time :smiley:
Thanks for making me see @Tamsy !!

PS: Not sure if this is (still) required, but it can’t hurt to add it :stuck_out_tongue:
185.199.108.154 pkg-containers.githubusercontent.com