How To Use a Raspberry Pi 5 With An NVMe SSD For Home Assistant

These were the steps I had to take to get Home Assistant running on my new Raspberry 5 with an NVMe SSD on the HAT.

Flo

Assembly of the hardware

Make sure to buy working hardware. My setup is the following:

Make sure, that you connect the PCI cable between the HAT and the Pi the correct way (often the endings are labeled with RPi5 etc). If it is the wrong way around, nothing works!

Creating a bootable medium

I want to run the new Pi without a SD card because it can be very error prone. This means, I somehow have to get an image onto the SSD. The quickest way is to use a temporary SD card for the transfer. Sadly, my only left-over SD card has some issues and the Pi imager is not able to flash it. So the only way was to use one of my old USB sticks.

  1. Download Raspberry Pi imager from the web
  2. Go through the steps
  3. Activate SSH and set up your wifi
  4. Wait for the writing to be done

Connect the bootable medium to your Raspberry Pi 5

  1. Connect the SD card/USB sticks (make sure to connect to the blue USB 3 port)
  2. Connect your Raspberry Pi to power (make sure it is a powerful power adapter, most posts suggest 25 W, 5 V, 5 A)
  3. Go to your router and find out which IP address your new raspi got assigned (mine only started when I connected a monitor to it)
  4. Connect via SSL to your Pi

SSL

  1. Check if the SSD is recognized via running lsblk
  2. If it does not show up, open the config file and add the line
  • sudo nano /boot/firmware/config.txt
  • dtparam=pciex1
  • Reboot the Pi via sudo reboot
  • Check if the NVMe SSD now shows up after running lsblk
  • If not, make sure that there is no hardware fault like a too power-hungry SSD etc.

Flash HAOS to the SSD via SSL

  1. Download the image from the official website via e.g. wget https://github.com/home-assistant/operating-system/releases/download/17.2/haos_rpi5-64-17.2.img.xz
  2. Write the image to the disk via sudo rpi-imager --cli ./haos_rpi5-64-17.2.img.xz /dev/nvme0n1 sync

Set boot order

  1. Run sudo rpi-eeprom-config --edit
  2. Change order to BOOT_ORDER=0xf416
  3. Power off the Pi via sudo poweroff

Start up new Pi

  1. Connect Pi to ethernet
  2. Get the new IP address from your routers page

Create backup of old Pi

  1. Stop all apps (addons)
  2. Create full backup
  3. Download the backup

Restore the backup

  1. Start web UI of new Pi
  2. Select restore from backup
  3. Restore the backup and Wait
  4. Set the old IP address to the new Pi
  5. Connect all HW to the new Pi (Zigbee stick etc.)
  6. Make sure everything runs like before

Finish the setup

… by enjoying the speed of the SSD!