SD card failure on Pi4

Hello,

I am running HA in Pi4 an using SanDisk SD card (64GB). It happened the second time now that the SD card got damaged and I lost quite some work (no discussion about backups etc. … now I scheduled regular backups to not lose to much work).

Question regarding the hardware setup to you:
Instead of SD card, is there any other supported option for storage on Raspberry Pi to run Home Assistant? I found discussions like THIS, but @frenck mentioned somewhere that SSD is not supported for RPi. Or am I wrong?

I am looking for a stable, reliable and long-term setup, which is performant and fully supported by Home Assistant. Ideally I get enough space with that in order to store all the required data.

I appreciate your constructive feedback.

Thanks & kind regards, red

Take a look here

I’m pretty sure “Step 4”, Raspberry Pi 4 64-bit can be imaged on to an ssd

Yes I understand that technically there are several opportunities. But the question is that also stable and supported for a solid setup?

Your recommendation is then also similar to what’s explained HERE by @Jpsy. So, I will try this setup and just hope that it works for long-term. :slight_smile:

Thanks for the input. If there are more recommendations and tips, please let me know.

Kind regards, red

The problem with the solution in my guide is not stability. There are hardware combinations that refuse to run in the first place or only run with tricks. While other users (actually most of them) never experience any problem.
The problems that are described are strange. And so far it has not been possible to nail down a single factor to reproduce them.
But if you get it running it will be very stable and reliable. Just use a recommended hardware (or check the list that I linked) and your chances are very high to succeed.
My own system never failed within more than two years.

@Jpsy, cool that’s great to hear!!
Using a Pi4 4B (4GB), I ordered the following components (as recommended):

  • Kingston A400 SSD SA400S37/480G
  • StarTech USB 3.1 to SATA III Adapter Cable
  • official Raspberry 3.0A Pi Power Adapter

Hope that it works. Thanks for your input!

1 Like

Today I received the above mentioned components and directly tried to replace my SD card by the new SSD (480GB). It worked perfectly fine and it only took me a bit more than 1 hour to get the system running as before, but now using SSD. Thanks to @Jpsy for his article.

My previous setup:

What I required:

  • Kingston A400 SSD SA400S37/480G
  • StarTech USB 3.1 to SATA III Adapter Cable
  • official Raspberry 3.0A Pi Power Adapter
  • an additional SD card (for the bootloader)

This is what I did … enjoy :slight_smile:

I) Preparation

  1. optionally: created a backup of the existing HA installation & data and stored it in my local network / machine (I already did this on a daily basis, so I did not lose time).
  2. Shut down Home Assistant + Raspberry Pi 4 and unplugged all devices (incl. SD card with current HA installation)
  3. Exchanged the old Power Adapter by the new one (3A)

II) Exchanged EEPROM bootloader on Pi (only as of Pi4 !!)

  1. Installed Raspberry Pi Imager (download HERE) on my notebook
  2. Connected the additional SD card using my USB SD card reader to my notebook
  3. Started Raspberry Pi Imager on my notebook
  4. Selected Misc utility images > Bootloader > USB Boot (Boot from USB if available, otherwise boot from SD Card as OS)
  5. Chose the SD card as storage
  6. Wrote the bootloader to the SD card
  7. Removed SD card (containing bootloader) from notebook and plugged it into Pi4
  8. Started Pi4 / plugged in power supply

If you have connected your monitor using HDMI, you will actually see nothing (I just saw a green screen, that’s it). In the background the EEPROM was adapted and the boot sequence changed (now USB is the primary).

III) Prepared SSD with Home Assistant installation

  1. Combined StarTech USB 3.1 to SATA III Adapter Cable + Kingston A400 SSD SA400S37/480G and plugged them into my notebook
  2. From my notebook I followed the sequence as described HERE to install Home Assistant Operating System on the SSD.
  3. After writing the OS to SSD …
  4. Switch off the Pi, remove the bootloader SD and connect the SSD (containing the HA image) via USB 3.
  5. Switch on the Pi

Now the installation is being prepared as you already know from the SD card installation before. If you try to connect to HA using web browser the system will tell you that it needs some time to get ready.

IV) Restore old HA backup

There are many ways to restore a backup and I don’t want to explain here again.
I would just refer to this approach for instance: Home Assistant Tips - Restoring a Snapshot - YouTube

  1. So I actually created a new account on the fresh SSD installation
  2. Activated Samba share
  3. Connected to HA config store using smb
  4. uploaded the >2GB backup file
  5. triggered the restore via HA

The rest of the magic was automatically done. That’s it.

Hope that helps one or the other. :slight_smile:

red