hpr4125 :: Installing Home Assistant Operating System (HAOS), on a x86-64 machine
Method 1: Installing HAOS via Ubuntu booting from a USB flash drive to a generic x86-64 PC
Hosted by Ken Fallon on Friday, 2024-05-24 is flagged as Clean and is released under a CC-BY-SA license.
HA, HAOS, Home Assistant.
(Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr4125
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 00:11:31
Home Automation.
A open series on anything related to Smart Home, or Internet Of Things
Introduction
This is a follow up episode on Home Assistant (HA), see hpr4099 :: An introduction to Home Assistant (HA) for an explanation of what Home Assistant (HA) is, and why you might want to install it.
The Home Assistant Installation page offers several different install methods, listed along with the level of difficulty.
- Easiest: Plug and play with Home Assistant Green
- Easy: DIY with Raspberry Pi
- Intermediate: Extend with Home Assistant Yellow
- Hard: Install on other hardware
- Expert: Advanced installation methods
Today we will be installing Home Assistant Operating System (HAOS), on a x86-64 machine.
Home Assistant can be repurposed and installed on various hardware, such as an Odroid or a generic x86-64 machine. The Home Assistant Operating System allows you to install Home Assistant on these devices even if you have little to no Linux experience.
We are going to my HP t610 Flexible Thin Client, which has a 16GB SATA Flash Drive, and I upgraded it to 16G of Ram.
Note that this will install Home Assistant Operating System (HAOS) as a computer appliance. That means that it will run a bare OS with the various components in a customised docker setup. It will take over the entire computer, and requires secure boot to be disabled.
On the HP t610 Flexible Thin Client, that involves pressing "Esc" at boot to get to the bootup menu. If that doesn't work try pressing "F10" just after turning on the power.
Two methods to install
HAOS has no integrated installer like you would expect with distro hopping, but it requires that the image be burned directly onto the disk of the computer itself.
It has two methods to do this and "Method 2: Installing HAOS directly
from a boot medium", is basically take the disk out of the target system
and attach it to your own computer. The use a burning tool like Balena
Etcher, or dd
to write the image to disk. Much as you would
burn a sdcard for a raspberry pi. I don't have a way to do this so let's
go with method 1.
Method 1: Installing HAOS via Ubuntu booting from a USB flash drive
Here you download and burn live operating system as you would if you were distro hopping, the document suggests to use Ubuntu. I tried it but my HP t610 Flexible Thin Client didn't like it. It also didn't like Fedora despite having worked earlier, so I just used Debian LXQT.
- https://www.debian.org/download
- https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-12.5.0-amd64-lxqt.iso
Now you have Debian running off a usb stick on your target machine.
Steps to burn Home Assistant Operating System (HAOS) to disk on target
Anything after the '#' character is a comment and doesn't need to be typed.
Note The following steps are optional, and you should only do them if you wish to ssh to the target machine from your pc.
# Anything after the '#' charachter is a comment and doesn't need to be typed.
apt install openssh-server # Install the ssh server on the target
systemctl start ssh # Start it once installed
passwd user # Change the password or you can just use the default which is `live`
ip add # Get the IP address of the target
ssh user@ip.of.the.computer # Replace ip.of.the.computer with the actual ip address in the step above
Open a terminal on the machine, and type the su -
commands to get root access on the Debian OS running from the usb drive
on the target machine.
user@debian:~$ su -
Password:
root@debian:~#
Now you are root, the super user admin, you can install the
wget
command using the Debian apt
package
manager.
root@debian:~# apt install wget
Once wget is installed, we can use it to download the latest image
from the
HAOS
Download Page, which is haos_generic-x86-64-12.1.img.xz
at time of writing.
root@debian:~# wget https://github.com/home-assistant/operating-system/releases/download/12.1/haos_generic-x86-64-12.1.img.xz
Now we have the image we are going to write to the disk, but the question is which disk to write it to.
Your target PC will be different to mine but the tool
lsblk
is good for showing what is installed and
mounted.
root@debian:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 2.5G 1 loop /usr/lib/live/mount/rootfs/filesystem.squashfs
/run/live/rootfs/filesystem.squashfs
sda 8:0 0 14.9G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part
└─sda3 8:3 0 13.9G 0 part
sdb 8:16 1 58.6G 0 disk
├─sdb1 8:17 1 3G 0 part /usr/lib/live/mount/medium
│ /run/live/medium
└─sdb2 8:18 1 5M 0 part
The loop0
is the mount where Debian is running from,
while the mounted sdb1
and sdb2
have the word
live telling us that's the actual USB drive we installed Debian
on to.
While your disk will be different, for me the disk to install it on
is sda
. The partitions sda1
,
sda2
, and sda3
are left overs from a previous
install. They will be overwritten anyway.
The drive I will be targeting is therefore known to the system as
/dev/sda
The dd
command will do a disk duplication and writes the
ones and zeros from the if
input file, to the
of
output file.
The command below will take a while and not display anything
root@debian:~# dd if=haos_generic-x86-64-12.1.img.xz of=/dev/sda
761949+1 records in
761949+1 records out
390118272 bytes (390 MB, 372 MiB) copied, 66.3225 s, 5.9 MB/s
Plug in an Ethernet cable that is connected to the network. Power the
system on. If you have a screen connected to the Generic x86-64 system,
after a minute or so the Home Assistant welcome banner will appear in
the console. In the browser of your desktop system, within a few minutes
you will be able to reach your new Home Assistant at
homeassistant.local:8123
.
Links
- https://hackerpublicradio.org/eps/hpr4099/index.html
- https://www.home-assistant.io/
- https://support.hp.com/us-en/document/c03235347
- https://www.parkytowers.me.uk/thin/hp/t610/
- https://www.home-assistant.io/installation/
- https://www.home-assistant.io/installation/generic-x86-64
- https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/