HASSOS RPI4 and SSD

I was runnning hassos on RPI4 until my SD died so I thought to buy a SSD, install hassos and restore from an external backup.

When I connected the USB SSD disk I saw that RPI4 is unable to boot from USB for the moment so my plan B was to only boot from SD and mount the filesystems of the external disk.

To be consistent and to have the fewer problems restoring on the same OS, I installed hassos on SD aswell on SSD but my surprise is when I boot from SD I couldn’t find fstab to modify but there were all filesystems of the SD mounted.

My questions:

  • How can handle hassos the filesystems it mount at boot?
  • Is there any way to boot from other operating system installed on SD (hassio/raspbian) and get working hassos from SSD?

I tried also to install HassOS in RPi4 and SSD but get lots of problems. I have now Hass installed on Debian Buster Lite. Boot from SDCard and rest from SSD (root).

Work perfect here, and use the old root part of de SDcard as a fallback part.
Sometimes rsync ssd root to sdcard root. When Hass is crashing you can update the cmdline.txt back to SDcard root and boot up, rsync back and your SSD is running again.

Here steps maybe it will help you also:

Flash on SD Card Debain Buster Lite Image (Use Etcher) Here on OSX.

on PC or OSX go those steps:

sudo touch ssh
sudo nano /boot/wpa_supplicant.conf

Add line:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=NL
network={
ssid=“YOUR SSID”
psk=“YOUR PASSWORD“
}

Format SSD with FAT and then put SDcard in RPi4 and connect SSD also.
After SDcard is booted do these steps:

sudo mkfs.ext4 /dev/sda1 -L root
sudo mkdir /media/newdrive
sudo mount /dev/sda1 /media/newdrive
sudo rsync -avx --progress / /media/newdrive
sudo nano /boot/cmdline.txt*

Copy the full line in the cmdline.txt and comment out 1 with # in front
Replace the second line the “root=“ see below.
If you have something with resize, remove that part also.

root=/dev_/sda1 rootfs_type=ext4 root_wait rootdelay=5
reboot now*

Correct location and timezone

raspi-config

Make IP Static / Only when its needed :slight_smile:

sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.100.24
static routers=192.168.100.1
static domain_name_servers=192.168.100.1

Install Docker

sudo -i
apt-get install software-properties-common -y
apt-get update
apt-get install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq socat
curl -fsSL get.docker.com | sh

Install Hass.io

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m raspberrypi3

After about 20 Min login via WebUI. Create account

Copy backup files to the backup folder on new install

reboot now

Restore latest backup

/usr/share/hassio/backup

After restore is done shutdown HA only

Remove home-assistant_v2.db

reboot now
1 Like

I did a lot of tests based on your response and finally I copied raspbian to both SSD and SD, I made the changes in cmdline of the SD pointing to my SSD root partition that in my case is sda2 because sda1 is boot partition as it’s cloned from image.

My first issue was SSD speed was really slow, see this post (hope it helps to someone):
https://www.raspberrypi.org/forums/viewtopic.php?t=245931

Finally I couldn’t make it fully working restoring a backup, there where a lot of problems so I decided start from scratch with a new HA installation

1 Like

I figured out a reliable way to get Rpi4 + HA on an SSD for both boot & data. I wrote a little howto here.

https://community.home-assistant.io/t/raspberri-pi-4-10-steps-howto-get-both-hassio-boot-data-run-over-an-ssd/372548