In order to get Home Assistant OS running on a Raspberry Pi with an NVME drive, we have to take a slight detour. Here are the steps I took to get it fully working.
- Raspberry Pi 5
- PCIe NVME SSD hat
- M.2 PCIe NVME SSD
- Micro SD card reader in your computer
- For the NVME Hat I've used the Geekworm X1001. It's a simple plug and play device which screws on top of the Pi Amazon Link
- NVME SSD compatible with the Hat. Note it must be a PCIe SSD. SATA is NOT supported! I've used a Kingston NV2 500G M.2 2280 NVMe Amazon Link
(I have NO affiliations with Amazon for the links whatsoever)
- Plug in de Micro SD card in your computer and format it.
- Download the Raspberry Pi imager tool here
- Install Raspberry Pi OS on the SD card
- Remove the SD card. Plug it in the Pi and wait for it to boot
- Depending on your setup, either shell into the Pi, or open a terminal via a connected keyboard
- Make sure the NVME drive is visible
- Run
lsblk
to see a list of attached disks. - You should see something like
nvme0n1
in the list. Note this name. - If the NVME drive is NOT visible, add
dtparam=pciex1
on a new line in/boot/firmware/config.txt
and then reboot. After rebooting please revalidate.
- Run
- Download the HAOS image
- Figure out the latest version here
- Then download the image using
wget https://github.com/home-assistant/operating-system/releases/download/13.1/haos_rpi5-64-13.1.img.xz
- Run the installer command
sudo rpi-imager --cli ./haos_rpi5-64-13.1.img.xz /dev/nvme0n1
. Please replace the filename and mount device with the appropriate values in your situation. - Now we have HAOS installed on the NVME drive. This is great progress! There is just one problem, and that is that by default the Pi will not boot from the NVME drive. Let's fix that next.
- Open the file
/boot/firmware/config.txt
and adddtparam=pciex1
to a new line. (You can skip this step if this has been done in a previous step) - Edit the EEPROM to enable PCIE boot with
sudo rpi-eeprom-config --edit
. - Modify the
BOOT_ORDER
line to the following:BOOT_ORDER=0xf416
. - (OPTIONAL) The Pi is certified for PCIe 2.0 speeds. You can force 3.0 speeds by adding
dtparam=pciex1_gen=3
on a new line. This massively increases speed, but can cause stability issues. Please use this at your own risk. - Turn off the Pi by running
sudo shutdown now
. - Wait till it's fully powered off. Unplug the power cord. Then remove the SD card.
- Plug in the power cord, and wait till the Pi has booted. If everything went correct, you should be able to visit your home assistant instance by going to: http://homeassistant.local:8123 🥳
Most (cheap) SD cards are not extremely durable when running a Raspberry Pi 24/7 on it. It would be a waste if you entire Smart Home seizes to function due to a broken SD card. Also; in case of a reboot the NVME drive speeds up the boot time to just a few seconds before HA is running.