Just installed HA on Ubuntu 20.04 - not flawless

Hi;

I am attempting to update my home assistant installation instructions for ubuntu 20.04 virtual machine (installer.sh).
Old instructions: https://www.rossco.org/modules/TreeList/wrap.php?url=/SecureOffice_Files/Ubuntu_Server_Virtual_Machine.htm

Bottom Line:
At first Home Assistant install:

  • HA up and operating as expected
    Post Reboot:
  • HA not start
    Can start by:
  • sudo systemctl stop hassio-supervisor.service
  • sudo systemctl stop hassio-apparmor.service; sudo systemctl start hassio-apparmor.service
  • sudo systemctl start hassio-supervisor.service
    Next Reboot:
  • HA not start, with or without “sudo systemctl enable hassio-supervisor.service” pre-reboot
Here are my current installation steps on a Ubuntu VM:
•	"sudo apt -y install postgresql postgresql-client"
•	"sudo apt -y install python3-psycopg2"
•	"sudo su - -c "/usr/bin/psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\"" postgres"
•	"sudo su - -c "/usr/bin/createdb hass" postgres"
•	"sudo apt -y install apt-transport-https ca-certificates curl software-properties-common lsb-release socat"
•	"curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -"
•	"lsb_release -a" to verify the Ubuntu version for the next command. 
•	'sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal test"'. Include everything between, not including outer single quotes. "focal" (Ubuntu Version) may have to be replaced with the version determined previously. If the command does not work, this means that docker has not yet caught up to Ubuntu release, so, use "focal".
•	"sudo apt upgrade"
•	"sudo apt -y install docker-ce bash jq avahi-daemon dbus apparmor-utils network-manager". Wait for completion. 
•	"sudo systemctl disable ModemManager; sudo systemctl stop ModemManager" ModemManager interferes with serial Z-Wave and Zigbee devices.
•	"cd /tmp; wget https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh; chmod +x installer.sh". 
•	"sudo bash installer.sh". Enter "not supported" if prompted. Enter "y" if asked to proceed. Wait for Hass.io installation to complete. 
•	Repeatedly enter "ls -la /usr/share/hassio/homeassistant/automations.yaml" until the file exists. Otherwise, next commands will fail due to home assistant not yet ready.
•	Next two commands configure HA to load all automations (*.yaml files) from "/usr/share/hassio/homeassistant/automations" directory as opposed to single file "/usr/share/hassio/homeassistant/automations.yaml" which can get large and confusing. Best to configure automations in separate files per automation.
•	"sudo mkdir -p /usr/share/hassio/homeassistant/automations"
•	"sudo sed -i 's#include automations.yaml#include_dir_merge_list automations/#g' /usr/share/hassio/homeassistant/configuration.yaml".
•	#systemctl enable hassio-supervisor.service
•	"sudo docker ps" to display running docker containers as confirmation that Hass.io is running. 

Also; ran into and fixed these issues with Ubuntu 20.04:

https://askubuntu.com/questions/1239503/ubuntu-20-04-and-20-10-etc-securetty-no-such-file-or-directory
https://askubuntu.com/questions/1242731/ubuntu-20-04-multipath-configuration 

This appears to be root cause:

"multi-user.target: Job hassio-supervisor.service/start deleted to break ordering cycle starting with multi-user.target/start"

I can make the HA VM downloadable if neccessary.

Anyone seen this behavior before; suggestions?

Thanks; Bill

1 Like

Have you see the community guides category?

And for that officially supported supervised Linux OS:

yes; I have studied both and previous (working) installation was on Ununtu 18.04. Have issues with Ubuntu 20.04

…B

As an FYI,
If you want to be adventurous, you can setup QEMU/KVM on Ubuntu 20.04, and then simply download the QCOW Hass image and run the image under QEMU/KVM. The image has all the things already put together and works out of the box. The issue is that it takes some work to understand and setup QEMU/KVM.

Update:

The

"multi-user.target: Job hassio-supervisor.service/start deleted to break ordering cycle starting with multi-user.target/start"

issue was due to:
“sudo systemctl enable hassio-supervisor.service” being active"
disabled it:
“sudo systemctl disable hassio-supervisor.service”

and HA attempts to start at boot if i do a clean HA shutdown:
“sudo systemctl stop hassio-supervisor.service”
prior to shutdown

Two scenarios:
If I shutdown using reboot (soft boot), at boot:

  • HA Cleans up images
  • HA attempts to start images, Fails with: “Image not exist” for all images, no attempt to download images
  • HA in endless loop attempting to start and fail for all images.
  • Seems familiar to this bug report: https://github.com/home-assistant/supervisor/issues/1529

If shutdown using “sudo shutdown now” (next boot is cold, start VM):

  • HA Cleans and downloads images
  • HA starts properly
  • If do again, clean HA shutdown, power “sudo shutdown now”, start VM as above - all images cleaned and de-downloaded

Cannot get HA to start without full re-download of images.

Is Ubuntu 20.04 NFG, have to revert to 18.04 for HA?

Thoughts?
…B

Love to; but the images are intended for newbies, to be run on Windoze, Linux, or www.rossco.org

…B

Ok; fixed this

root cause was using the “focal” Ubuntu repository for install. Apparently not yet ready for showtime.
Use the “eoan” repo instead until “focal fixed”

FYI: have not submitted bug report.

Updated (tested working) installation instructions at:
https://www.rossco.org/modules/TreeList/wrap.php?url=/SecureOffice_Files/Ubuntu_Server_Virtual_Machine.htm

…B

1 Like

I had the same issue yesterday with Debian 10, once I downgraded to docker-ce 5.19 from 5.20 it started working as normal.

Re-org my site, new link:
https://www.rossco.org/modules/publisher/item.php?itemid=31#Create_Hassio_Virtual_Machine

Sub-optimal “solution”. See my link above. Reverting docker-ce is not proper fix. focal repo is the problem.

Nah, it’s a proper solution for Debian 10.

1 Like

I just had the same issue with Debian 10. Thank you for the work around