The only way I got SSD booting on Pi4 is to go with Raspbian Buster instead of HassOS and then install Hassio on top.
The caviat is that you will still have to have sd card plugged in to boot but then everything will run of SSD usb. I got a Kingston A2000 NVMe drive (it’s pretty cheap considering the speed you get) and Shinestar adapter for it . While you are there pickup yourself this bad boy heat sink case Pi4 runs much hotter then pi3 and will throttle, and you will be back at pi3 speed
It was actually pretty easy setup from there
------------ Step by step Pi4 + SSD guide------------
Install Raspbian Buster and Setup SSD handover
- install official Raspbian Buster Lite version (burn it using BalenaEtcher), (put SSH file on SD boot partition so you can connect to it on boot). Don’t worry about the SSD just yet.
- boot it up, then plugin your new drive and follow this guide: https://tomshardware.com/news/boot-raspberry-pi-from-usb,39782.html
- there is a typo in that guide when editing cmdline.txt file, it should be
sudo nano /boot/cmdline.txt
instead of sudo nano /boot/cmdlinetxt
- After the reboot you will be running completely of USB, you must have sd card inserted in order for it to boot up though. You can test by running
findmnt -n -o SOURCE /
it should now say /dev/sda1
or sda2
- Run an update to get the latest kernel etc
sudo apt-get update && sudo apt-get dist-upgrade
(borrowed from hugh_man above)
Install docker (instructions taken from this thread on docker ) :
$ sudo curl -sL get.docker.com | sed 's/9)/10)/' | sh
Install hassio dependencies (instructions taken from here )
$ sudo apt-get install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common
Install hassio borrowed from here
-
Save hassio installer to file: $ curl -sL "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh" >> hassio_install.sh
-
Run install script: `$ sudo bash hassio_install.sh -m raspberrypi4’
or you can do raspberrypi4-64 if you are feeling adventures.
Restore HA Snapshot
All done, you should now be able to access Home Assistant from your pi ip. Login and restore your snapshot. I would also uncheck nginx or duckdns addons if you had those and reinstall them manually. I had to edit my local host file just to get back in because of them.
Also it appears that HA doesn’t get started automatically after the snapshot restore, you will have to start it up by connecting your homeassistant docker container and running “hassio ha start” , I gave it 15min and then started it (or you can reboot your Pi4 that should start it up again)
If you used Zwave Aeotec Z-Stick Gen5 stick on Pi3
Buy the Sabrent 4 port USB2.0 adapter. Otherwise your Zwave Aeotec stick won’t work, more info on this here. I tried 2 different ones some of them sort of work but they glitch, this one has been solid for a few days. Make sure you get the USB2.0 version, plug it in to a usb2.0 port. I got 50+ zwave devices on this thing and they are all humming along. You can also switch to HUSBZB-1 (if you don’t want to deal with the hub) and will give you Zigbee as well. The only issue is that you will have to remove all your Zwave devices one by one and then re-add them back to the new stick one by one (no thank you). If anyone knows away around this I would LOVE to hear it.
Remove ModemManager from Rasspbian apparently this conflicts with Zwave devices
From the main pi (not from hassio ).
Run sudo systemctl disable ModemManager
Followed by sudo apt-get purge modemmanager
If you used GPIO ports, some now are disabled
I was using about 10 ports for my home alarm reed sensors. Pi4 has the same Gpio layout however for some reason ports don’t get set to pull up resistor which is needed to read the switches. They still show up active under hardware menu but will be useless without the pull up resistor (this happend on HassOS as well btw). The workaround is you have to manually set them to “pull up” during boot inside raspbian. Here is a guide on how to do that
Pi4 + SSD Performance Difference
The performance with that drive is huge! I’ve been getting score of 9500 with that drive vs 300. You can benchmark yourself, while you are in Raspbian run:
curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
You can see other’s people benchmarks here: https://jamesachambers.com/raspberry-pi-storage-benchmarks/
In the real world it means no more waiting when clicking between screens. Recorder and Event log is actually usable, you click it and things instantly show up. Before I had to count to 10 to get it to show up.
Raspbian vs HassOS difference
For those who are wondering if Raspbian OS is faster then HassOS !
- benchmark with HassOS
- with Raspbian
so pretty much the same thing