How to boot Home Assistant on a Raspberry Pi 4 of an SSD

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.

A Raspberry Pi sitting on a table

There's no denying that Raspberry Pis, especially the Raspberry Pi 4, are nifty little single-board computers. They're affordable, they don't spit out a ton of heat (so no need for active cooling in most scenarios), and they are incredibly energy-efficient, guzzling a mere 3.4-7.6 watts. They're perfect for beginners, but don't be fooled by their size – the Raspberry Pi 4 packs enough punch to power your Home Assistant even if you're a more advanced user juggling countless automations, scripts, and add-ons.

The Raspberry Pi 4's Achilles' heel

The Raspberry Pi 4, however, does have a significant Achilles' heel compared to Intel NUC systems and other platforms. It doesn't have any SATA or NVMe connectivity, and instead leans heavily on a microSD card for storage. Unfortunately, microSD cards aren't big fans of being written to repeatedly, which is something Home Assistant does fairly regularly. While you can opt for an endurance rated microSD card, it's more likely that down the line, you'll be craving something more reliable.

Solid-state drives to the rescue for Home Assistant

If you're running Home Assistant on a Raspberry Pi 4, the smartest way to go, is with an external SSD. Not only is it more reliable, but it could also provide faster speeds and more storage capacity. Sure, the price tag might be a bit higher, but can you really put a price on the reliability of your Home Assistant? I'll leave that for you to ponder.

External SSDs from Samsung

SAMSUNG T5 500GB USB 3.1 Pocket Size Portable External SSD (Blue)
SAMSUNG T5 Portable SSD 1TB - Up to 540MB/s - USB 3.1 External Solid State Drive, Black (MU-PA1T0B/AM)
Recommended
SAMSUNG T7 Portable SSD 500GB - Up to 1050MB/s - USB 3.2 External Solid State Drive, Blue (MU-PC500H/AM)
SAMSUNG T7 1TB, Portable SSD, up to 1050MB/s, USB 3.2 Gen2, Gaming, Students & Professionals, External Solid State Drive (MU-PC1T0H/AM), Blue
Product
Samsung T5
Samsung T5
Samsung T7
Samsung T7
Speed
Up to 540 MB/s
Up to 540 MB/s
Up to 1050MB/s
Up to 1050MB/s
Capacity
500 GB
1 TB
500 GB
1 TB
Price
$204.99
$239.99
$59.99
$79.99
-
-
Amazon Prime
Amazon Prime
SAMSUNG T5 500GB USB 3.1 Pocket Size Portable External SSD (Blue)
Product
Samsung T5
Speed
Up to 540 MB/s
Capacity
500 GB
Price
$204.99
-
SAMSUNG T5 Portable SSD 1TB - Up to 540MB/s - USB 3.1 External Solid State Drive, Black (MU-PA1T0B/AM)
Product
Samsung T5
Speed
Up to 540 MB/s
Capacity
1 TB
Price
$239.99
-
Recommended
SAMSUNG T7 Portable SSD 500GB - Up to 1050MB/s - USB 3.2 External Solid State Drive, Blue (MU-PC500H/AM)
Product
Samsung T7
Speed
Up to 1050MB/s
Capacity
500 GB
Price
$59.99
Amazon Prime
SAMSUNG T7 1TB, Portable SSD, up to 1050MB/s, USB 3.2 Gen2, Gaming, Students & Professionals, External Solid State Drive (MU-PC1T0H/AM), Blue
Product
Samsung T7
Speed
Up to 1050MB/s
Capacity
1 TB
Price
$79.99
Amazon Prime

External SSDs from SanDisk

WD 500GB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - WDBMCG5000ABT-WESN
Western Digital 1TB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - Western DigitalBMCG0010BBT-WESN
WD 500GB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF5000AGY-WESN
WD 1TB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF0010BGY-WESN
Product
WD My Passport Go
WD My Passport Go
WD My Passport
WD My Passport
Speed
Up to 400MB/s
Up to 400MB/s
Up to 1050 MB/s
Up to 1050 MB/s
Capacity
500 GB
1 TB
500 GB
1 TB
Price
$74.96
$89.99
$69.96
$128.50
Amazon Prime
Amazon Prime
Amazon Prime
-
WD 500GB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - WDBMCG5000ABT-WESN
Product
WD My Passport Go
Speed
Up to 400MB/s
Capacity
500 GB
Price
$74.96
Amazon Prime
Western Digital 1TB My Passport Go SSD Cobalt Portable External Storage, USB 3.0 - Western DigitalBMCG0010BBT-WESN
Product
WD My Passport Go
Speed
Up to 400MB/s
Capacity
1 TB
Price
$89.99
Amazon Prime
WD 500GB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF5000AGY-WESN
Product
WD My Passport
Speed
Up to 1050 MB/s
Capacity
500 GB
Price
$69.96
Amazon Prime
WD 1TB My Passport SSD Portable External Solid State Drive, Gray, Sturdy and Blazing Fast, Password Protection with Hardware Encryption - WDBAGF0010BGY-WESN
Product
WD My Passport
Speed
Up to 1050 MB/s
Capacity
1 TB
Price
$128.50
-

External SSDs from Western Digital

PNY Elite 480GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-480-FFS)
PNY Elite 960GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-960-FFS)
Crucial X6 500GB Portable SSD - Up to 800MB/s - PC and Mac - USB 3.2 USB-C External Solid State Drive - CT500X6SSD9
Crucial X6 1TB Portable SSD - Up to 800MB/s - PC and Mac - USB 3.2 USB-C External Solid State Drive - CT1000X6SSD9
Product
PNY Elite
PNY Elite
Crucial X6
Crucial X6
Speed
Up to 430 MB/s
Up to 430 MB/s
Up to 540MB/s
Up to 540MB/s
Capacity
480 GB
960 GB
500 GB
1 TB
Price
$47.99
$122.75
$42.99
$59.99
Amazon Prime
Amazon Prime
Amazon Prime
Amazon Prime
PNY Elite 480GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-480-FFS)
Product
PNY Elite
Speed
Up to 430 MB/s
Capacity
480 GB
Price
$47.99
Amazon Prime
PNY Elite 960GB USB 3.1 Gen 1 Portable Solid State Drive (SSD) - (PSD1CS1050-960-FFS)
Product
PNY Elite
Speed
Up to 430 MB/s
Capacity
960 GB
Price
$122.75
Amazon Prime
Crucial X6 500GB Portable SSD - Up to 800MB/s - PC and Mac - USB 3.2 USB-C External Solid State Drive - CT500X6SSD9
Product
Crucial X6
Speed
Up to 540MB/s
Capacity
500 GB
Price
$42.99
Amazon Prime
Crucial X6 1TB Portable SSD - Up to 800MB/s - PC and Mac - USB 3.2 USB-C External Solid State Drive - CT1000X6SSD9
Product
Crucial X6
Speed
Up to 540MB/s
Capacity
1 TB
Price
$59.99
Amazon Prime

Preparing the Raspberry Pi 4

To get Home Assistant to boot from an external SSD, you'll need to roll up your sleeves and prepare your Raspberry Pi 4. You'll still need a microSD card for this step, but don't sweat it if you don't have a high-end one – any old microSD card you have lying around will do the trick.

First things first, install Raspberry Pi OS (formerly known as Raspbian) onto the microSD card. The “Raspberry Pi OS (32-bit) Lite” image is perfect for this, since you only require shell access. No need to hook up your Raspberry Pi 4 to a monitor and keyboard. To flash the image onto the card, you can use an app like balenaEtcher. Once the image is flashed, you can enable SSH by creating a file named “ssh” (sans extension) on the boot partition of the microSD card. To accomplish this, open Notepad, save an empty file, and select “All files” under “Save as type:”. If you see two partitions in your file explorer, the smaller one is the boot partition.

With the microSD card ready to rock, you can remove it from your computer and pop it into the Raspberry Pi 4. Then, just connect a network cable and boot up the Raspberry Pi 4 by plugging in the power cable.

How to upgrade your Raspberry Pi 4 Bootloader Firmware

You will need an SSH client to access the Raspberry Pi 4 and the one I recommend is MobaXterm, though you can now also use the Windows Terminal. Once installed, you can look up the Raspberry Pi 4’s IP on your router and enter it in MobaXterm by clicking on “Session” and choosing “SSH”.

Now that you're in the driver's seat, it's time to update the bootloader update utility. How do you do that? Just type in these magic incantations (or, if you're not feeling particularly wizard-like, you can just copy and paste them into MobaXterm):

sudo apt update
sudo apt full-upgrade
sudo reboot

After your Raspberry Pi 4 has stretched its legs and booted up again, it's time to see if there are any updates to the bootloader. This can be done with the following command:

sudo rpi-eeprom-update

If there's an update waiting in the wings (the shell will inform you with a “*** UPDATE REQUIRED ***” message), you can install it using these commands:

sudo rpi-eeprom-update -a
sudo reboot

With your Raspberry Pi 4 bootloader all shiny and updated, you can then safely shut down the system using the following command. This is a good practice as it ensures the safety of your microSD card:

sudo shutdown -h now

Installing Home Assistant on an external SDD

Presently, only the HassOS development builds are capable of booting from an external SSD, so you might encounter a bug or two along the way. To get started, download the latest Development 5 build X for the Raspberry Pi 4 from GitHub (currently hassos_rpi4-64-5.4.img.gz).

Once your download is complete, you'll need to flash the image using balenaEtcher. The twist this time is that you'll be flashing it to your external SSD, not a microSD card. When that's done, plug the SSD into your Raspberry Pi 4 and power it on by reconnecting the power cable. Home Assistant should boot up just as it would from a microSD card. Give it a moment to find its feet, and you're all set!

A portrait photo oif Liam Alexander Colman, the author, creator, and owner of Home Assistant Guide wearing a suit.

About Liam Alexander Colman

is an experienced Home Assistant user who has been utilizing the platform for a variety of projects over an extended period. His journey began with a Raspberry Pi, which quickly grew to three Raspberry Pis and eventually a full-fledged server. Liam's current operating system of choice is Unraid, with Home Assistant comfortably running in a Docker container.
With a deep understanding of the intricacies of Home Assistant, Liam has an impressive setup, consisting of various Zigbee devices, and seamless integrations with existing products such as his Android TV box. For those interested in learning more about Liam's experience with Home Assistant, he shares his insights on how he first started using the platform and his subsequent journey.

Comments

  1. Hi, I have followed your guide but used a Samsung 970 Plus NVMe – instead of running faster than the SD card, it is painfully slow with Home Assistant. Just opening the account took nearly an hour and adding each integration was around 40 min. What am I doing wrong? Im using a raspberry PI 4 8GB. I have the NVMe plugged into the top blue USB. Also the NVMe is running really hot in this case
    “M.2 NVMe SSD Enclosure, Aluminum USB C 3.1 Gen 2 to M-Key M&B-Key NVMe PCIe 10Gbps External Enclosure, Fits 2230/2242/2260/2280 NVMe PCIe SSD, Tool-Fr”

    any help is much appreciated. Thank you in anticipation.

    Reply
    • Hello,
      I think you need to update raspberry firmware with this command :

      sudo apt update
      sudo apt full-upgrade
      sudo rpi-update

      Reply
  2. Thank you very much for this procedure.
    It works for very (so far) on RPi 4 2GB with USB SSD 110 GB in a Argon One enclosure.

    Can you tell me how I can install the Argon One scripts for controlling the internal fan in the enclosure?

    After connecting the SSD to the RPi my terminal is no longer accessible.
    Thanks for your help and understanding in advance.

    Regards
    Arjen
    Netherlands

    Reply

Leave a comment

Share to...