One of the things I like about blogging to myself is that the process tends to motivate me to do other things. This is one good example! I blogged a little about moving my Home Assistant server from a FreeBSD jail to a Raspberry Pi 4 (Pi) in my New Year blog here. In that, I also mentioned upgrading the OS from the micro SD (mSD) card to a more robust Solid State Drive (SSD). This is about how I created my Home Assistant SSD.

It’s only in the last few months that the ability to boot from an SSD has become a reality. Sure, some people had got this working before that, but it wasn’t straight forward. It’s now part of the kernel and OS so as long as your Pi is up to date, it’s pretty straight forward.

The main challenge was how to migrate from the Pi currently running Hass.io and Home Assistant Core from an mSD card to the same Pi booting from an SSD, without too much downtime or having to recreate the configuration.

The Home Assistant Supervisor allows you to create Snapshots so this was the first step in the process. I created a snapshot and then connected via SSH to copy that off to another machine.

Next, I updated another Pi 4 (which I tend to use for playing with new distributions) to the latest version of Raspberry Pi OS and ensured it had the latest firmware and EEPROM which enables SSD boot.

Once this was working, I used balenaEtcha to copy the Home Assistant OS onto the new SSD I’d bought which was connected via a USB3 to SATA adapter. If you’re doing this and come acrosss my blog, that’s probably the most important step as buying the wrong ones could make this pretty much impossible!

Luckily, the ones I’d picked on Amazon were supported and worked without any issues. The only problem I did encounter was when I first tried to use the 32-bit version of Hass.io. I’m not sure why that didn’t work, and may have been something I’d done wrong, but when I burned the 64-bit version that worked just fine and is probably the better option for future-proofing things anyway.

Once that was up and running, I restored the snapshot I’d taken from the other Pi running on mSD and checked things looked to be working. I have NGINX Proxy Manager running on this Pi so I redirected my external ports to the new IP of the newly configured Pi and this worked fine, and minimised the downtime while I reconfigured the old Pi.

This was pretty much the same process as I’d used above, booting from a new Raspberry Pi OS mSD and then running all the updates. I’ll pop the commands below:

sudo apt update 
sudo apt full-upgrade 
sudo reboot

sudo rpi-eeprom-update
sudo reboot

sudo raspi-config (for any changes to boot order and SSH interfaces)

Once that was done it was simply a case of moving the Home Assistant SSD to the old Pi and redirecting the ports back to the old IP address. And it worked! Well, mostly!

There were a few minor things to fix and reconfigure. The database used for the Home Assistant history was corrupt but I simply decided to rename that and reboot which created a new one. A couple of integrations needed to be reloaded for the devices to be recognised and I removed one and recreated it.

But generally, it worked really well and is so much faster than it was running from the mSD card. I’m hoping it updates faster too, which was always a slow and painful process. I’ll probably blog a little more about how I use Home Assistant over the course 2021, but I’ll leave you with a couple of pictures of my new Home Assistant Raspberry Pi Server booting from an SSD drive.

The Raspberry Pi 4 (2GB) is in a GeekPi case, and the SSD is attached to the bottom with a strip of velcro. I’ve also attached 4 rubber feet to the bottom of the SSD so it doesn’t slide around on top of my TrueNAS server.