SD card failure on Pi4

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