Installing Home Assistant on a RPi 4b with SSD boot

Yes, you (@Jpsy) are right. For a test, or a system without addons, it is ok.
I bought a Raspi4 4gb, and the difference is recognizable.
E.g. with my system (Zigbee2mqtt, Esphome and some other addons) the 4gb version shows a much better reaction time and i can get the logs on the superviisor page, which was not possible with the 1gb version.
But only Hass.io without addons, the 1gb version could be enough to test stuff, but not much more.

I am really happy now with 4gb version, but more power could be better in the future (raspi5?)

There are hickups in some combination of SSD & USB3 hubs, I made a complementary howto to fix those: (Raspberri Pi 4) 10 steps howto get both HASSIO boot & data run over an SSD

@Jpsy
Just to let people know that have been following this guide that a new beta HAOS (7.1) has been released that fixes the freeze issues that many of us have experienced with certain RPI 4 models. It is currently in test by many of us that have been commenting in the GitHub 1119 issue and so far no one has reported any issues with the beta or the pre beta. There were some great users (a special thanks to (Oliver), RPI developers (several) and HAOS developers (@agners & others) that finally figured out the issue and a solution. By the way it was not an issue with the controllers, power supplies or SSD. If interested the fix is list here:

https://github.com/raspberrypi/firmware/issues/1646

and the 600+ messages with the issue is here:

https://github.com/home-assistant/operating-system/issues/1119
3 Likes

This is really great news!
BTW I am running 7.1 myself for several days now without any problems.

I would not expect you to. The fix was for a clock timing issue that effected some of us. If you read the discussion the original change was based on a theory from Broadcom. The new change is in the RPI firmware. Some users are in the weeks of testing with no issues.

Anyone using this Anker power bank to power their rpi4 with SSD? Would this work in replace with the raspberry pi official PS? The Power Delivery (PD) is rated as follows from this Anker model:

USB-C Output: 5V ⎓ 3A / 9V ⎓ 2A USB-A Output: 5V ⎓ 2.4A (max.) 

Valuegist USB 3.0 to SATA 3.0 Adapter Cable for 2.5" SSD/HDD Drives, SATA III to USB 3.0 External Converter Cable does not work properly, ordered the startech one now

Startech cable USB352SAT3BCB Barcode 065030854696 https://www.amazon.co.uk/gp/product/B00HJZJI84/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
Works well, I’ve just created a new HA image and I’m just restoring my snapshot from an SSD card.
Using a Samsung EVO 840 120GB SSD drive
RP 4B 4gb

1 Like

@bschatzow,
Yes, followed that thread closely since I had the freeze issue. Actually got my installation working after reverting to OS 4.2, was rock solid for weeks (got some flak here for mentioning that suggestion
)
After reading about the release of 7.1 I uppgraded and my system continued being stable (Seems 7.1 is actually using some older files/settings that were present in for instance 4.2)
Anyway, would like to say something about my perception of the troubleshooting in this thread; seems it’s sometimes a bit one sided, focusing sometimes a bit too much on power supply. In my case I tried to get focus away from that since I had recommended amps and still had issues, wanting to investigate other venues, but focus steered back to power supply.
Just my humble opinion.

I believe the people were of good intentions. They did not understand how since most had no issues and some of us did it had to be something wrong in our setup (Power supply, controller, SSD, etc.) They were guessing on what it could be. It took one of the developers (Stefan) to finally see what many of us saw for over a year to finally ask the correct questions of the Raspberry developer team as well as a couple of people in the HA community that truly understood how the firmware was being loaded to try many different version to figure out what got changed and how to fix it. If you read the GitHub #1646 that I referenced above you can read through all the troubleshooting steps and what the fix was.

1 Like

Can you please a bit more elaborate option with PI Imager. Which recovery should I use? If I understand correctly it will automatically change settings to boot from SSD? Is this permanenet fix?

Just dowload the app and install it and follow instructions. One of the possibilities is an image, that only updates the eeprom.

And the answer to your two questions: Yes and Yes

Hi @Jpsy

I followed this guide just over 1 year ago and currently my system is still on OS version 5.10.17-v7l+ everything have been very stable. Should I update the OS to the latest 7.1 or is there no advantages in doing this? Also if there are benefits to upgrading the OS, can this be done completely remotely via SSH? I’m away from home so cannot mechanically interface with the RPi.

System Health:
version: core-2021.12.10
installation_type: Home Assistant Supervised
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.17-v7l+
arch: armv7l
timezone: Europe/London

GitHub API: ok
Github API Calls Remaining: 4816
Installed Version: 1.19.3
Stage: running
Available Repositories: 947
Downloaded Repositories: 31

logged_in: true
subscription_expiration: 23 February 2022, 00:00
relayer_connected: true
remote_enabled: true
remote_connected: true
alexa_enabled: true
google_enabled: true
remote_server: eu-west-2-0.ui.nabu.casa
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: failed to load: timeout

host_os: Raspbian GNU/Linux 10 (buster)
update_channel: stable
supervisor_version: supervisor-2021.12.2
docker_version: 20.10.7
disk_total: 229.0 GB
disk_used: 29.7 GB
healthy: true
supported: failed to load: Unsupported
supervisor_api: ok
version_api: ok
installed_addons: Home Assistant Google Drive Backup (0.105.2), TasmoAdmin (0.16.0), Terminal & SSH (9.3.0), File editor (5.3.3), deCONZ (6.11.1), Mosquitto broker (6.0.1), Log Viewer (0.12.2), Z-Wave JS (0.1.52)

mode: storage

Yes the OS can be updated via SSH alone.

ha os update --version 7.2

But if your system is stable I see no advantage in updating it. Especially if you are not on site I recommend the conservative strategy to “never change a running system”.

Your location can be configured through configuration.yaml as well as through the web frontend. configuration.yaml has precedence. Look for latitude:, longitude: and time_zone:.

1 Like

THank you @Jpsy

Yes I will eer on the side of caution for the upgrade. Thank you for the command line to use when I’m ready for the upgrade.

This is really a different topic. Please see my PM. And open another thread if you still have questions.

1 Like

Hi and thanks for the guide.
I have raspberry pi 4 4GB and using and trying to use an SSD.

I have followed your guide exactly but with one SSD (kingston) I get:
Trying to partition: 0
Unable to read partiton as FAT


and trying another SSD it some times boots (very rarely) and others throws thousands of errors like this:
SQUASHFS error: Failed to read block 0x715cf5: - 5
SQUASHFS error: Unable to read fragment cache entry

system[1]: Failed to start Journal Service
Buffer I/O error on dev sd8, logical block 0, lost sync

EXT4-fs (sda8): I/O while writing superblock

and many many other errors.

If unplug and plug again after many many trials may some time boot again.

I have original raspberry power adaptor, tried both usb 3 and usb 2 ports and have this USB to sata

Any help please to troubleshoot it?

Hi there,

As you have tried two different ssd’s wouldn’t that point towards the issue with the SSD to USB 3.0 adaptor cable? That’s where I would start.

I went with this one and all working great:

https://www.ebay.com/itm/293350771617?_trkparms=ispr%3D1&hash=item444d118ba1:m:mfZ49TNIXhZXdTy0pPK2Lyw&amdata=enc%3AAQAGAAACkPYe5NmHp%252B2JMhMi7yxGiTJkPrKr5t53CooMSQt2orsS%252Fwocn770hnih0B3mVHNZ5CEkldfa%252FHqbAQRGkJNpB2L%252B8ppUsqtGbEP0JdBC0dUxxq5c5YUECuwL1SAb6GgLjveWpBukDqOKAQ0AYmUlxsWIatsq61bNbXB%252Bxf7k7Myoq%252FbLZaQWvzLv902SHRRwlChi6SpnIJTUcB0ic67dlJdTInv7WQejWpo%252FpRnew0qWibOo60BBw%252FHkXZ8TKScwK%252FJn%252FLFvs2QPrOnReoV3DWwN0PDFXemBpjZdCWthINIrm7BvjRFCVAGAJu1k1rurbgaCCnaYTV3cvGX1REpVs27ftsW20%252F1i5HIm11FnaS61TxZnSbYgEKmmi4iKTtsouhq6dGmi48OgrxrqZTZk6dhaFZijXaIj7ZaTlgRNPbyZPfSiEBJ2UX3w6yk4YfhAEWP3FycE1NtDj2Z1WXfBEGYLN11gqwtB1qKuq7BnEzkV%252FolWL0hxZg553Gd2eG3BHtjwvTGFHwNWgKhBNArEjooENFa%252BbalGz%252Bwlo8Yo%252Bk%252BF0Gfs%252BB43RJWc13G96klMx1l%252B%252BU%252FapDS5g6XWzTT2p5n4RSAZzIVXqUP0gO6ejLzScRM3snokSJLuTDhXJGiNfAQgc4Au2X%252ByAmzmEf1YxpbpJZJ8hQ631H7t81iT5wf1uw1p%252BuRZjC8okaNR21OFOJbmbCyDAJO5TnFkuSjLNkuKoaPrhs2Q93S2tu3GSsPXwoDxYhz8x%252FqnIePslM1HtAMdXmciyhG5barv%252BvjvyFvw1efb54Cp051c63jSA2Mm0bmPzi95Q7VjvacAFUwXvFM8HeH37%252FubYPMBb83W%252F3ohGoa4GNU4ryZIBy9Ewjnh%7Cclp%3A2334524%7Ctkp%3ABFBM7uCqvNVf

If the link doesn’t work then search the e-bay product number: 293350771617

Decided to completely forget about getting my HA to run on SSD, not worth the hassle after over a year of pointless troubleshooting.
SanDisk Extreme Pro SD-card, basic recorder optimization and moved the whole database inside the rpi4 4gb RAM-memory. Now that there is no more continuous writes to the SD-card HA should run all peachy.

EDIT: As a reminder about my issue, old 5.3 version of HAOS was working fine on the SSD but anything newer than that froze the system within 24 hours. No error logs available to see etc. Plenty of people lurking here with this exact same issue and devs haven’t been able to locate&fix the issue in all this time.
EDIT2: Oh, they actually located and fixed the issue on the 7.1 beta version? Oh well, I’ll still roll with the SD card as I have Raspbee II plugged to my rpi4.

have you tried the tuto I made, it’s exactly done to avoid the error messages you have:
(Raspberri Pi 4) 10 steps howto get both HASSIO boot & data run over an SSD