Installing Home Assistant on a RPi 4b with SSD boot

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

Can you show me how you did it step by step?

Steps to reduce Write Cycles and extend SD/SSD life expectancy - Community Guides - Home Assistant Community (home-assistant.io)

You can find all the steps over there. Simply adding db_url: 'sqlite:///:memory:' to recorder section in the configuration file will move the database to RAM.

Thanks a lot, but how to save the database in a secure place? It will be lost after every reboot if you use the RAM to save it. DO you use some script or stuff to do this?

I have absolutely no use for long-term data logging. At default settings the database wipes all 10 days old data anyway, and I have lowered it even further to 7 days.
If you need to collect long-term data from the sensors, you can always backup the data to external drive or cloud:
Memory db with cloud backup for analytics - Share your Projects! - Home Assistant Community (home-assistant.io)

Can you share your settings about recorder so i can understand better what you mean? My english is not so good…

Guys can you please do this in another thread?
You are hijacking this one and it is already bloated.
Thanks.

1 Like

When this discussion started here I replaced my SD for a SSD. After years of running without failures on a single SD card I wanted to get rid of the risk of a malfunctioning SD card. Everything went well till last week, couldn’t access HA anymore. First thought that my SDD died, had no spare SSD but at least with a SD card I could check that the PI was fine. Next day with a new SSD I wasn’t able to flash HA on it… found out that the StarTech 2.5″ SATA to USB 3.0 Adapter didn’t work anymore. So if you ever run into troubles don’t forget to check your cable. Anyone else who had issues with this cable?

A good back up strategy must be to have a standby adaptor cable and SSD with a recent installation of HA. But is there a better way to allow a complete standby system which can be switched to online mode if the primary system fails to boot? Maybe with a stand alone (not integrated in to HA) power socket that can be turned on from the manufactures app in the event of the main system failing?

Question about the USB 3 signal interference - does this impact devices on the RP4 only, or does it also impact nearby devices?

I have my Hue hub in the same location, and I want to make sure the RP4 SSD addition doesn’t impact its signal.

It can impact any other radio receiver that is too close to the ports and uses the affected frequency range. This is definitely true for any ZigBee bridge like Philips Hue.

Thanks (and thanks for this guide too)! My understanding is that the interferences comes from both ends of the USB cable, so it would still cause interference if I move my SSD further away with a longer USB cable. Does it make sense to use the USB 2 ports for the SSD instead to avoid the interference?

I wouldn’t do that. Running an SSD connected through USB 2 will heavily reduce the max performance of the SSD.

Instead position your Hue bridge further away from the Pi and it’s disk. RF signals lose power with distance squared: Doubling the distance will reduce the interference by a factor of 4.

First of all: Thank you very much for your work, @Jpsy !

For the files. I have had problems with booting from SSD. Got different warnings and error messages while the RPi was booting for ages. Tried this and that of what I have read here. Switchting from USB3 to USB2 port while connecting the SSD to the RPi has finally solved my issue. I definitely recommend to connect the RPi via HDMI to a screen/monitor. Yes, the SSD would perform even faster with USB3, but the speed increase by switching from SD card to SSD is already fast enough to me.

Hardware

Home Assistant

  • OS: 7.6
  • Core: 2022.4.5

What controller does the inateck use? The issues that people ( a some group) were having with SSD lock ups were fixed December and released in January. This issues dealt with lockups.
Not booting almost always was a hardware issue with controller or SSD being incompatible with the RPI. I would search the RPI forums to see if your hardware is compatible. There are several good articles showing tested hardware.

1 Like