Booting Raspberry Pi 5 from NVMe SSD: PCIe Setup, Boot Order, and Real-World Performance
The Raspberry Pi 5 was the first Pi to expose a real PCIe interface to the outside world — a single-lane PCIe 2.0 connection broken out through the small FPC connector next to the USB ports. Paired with an M.2 HAT, that turns into something the Pi platform never really had before: a boot-capable NVMe SSD with actual sequential throughput instead of the microSD card's usual bottleneck. This guide covers wiring up an M.2 HAT, updating the bootloader EEPROM, setting boot order, and what kind of real performance gain you're actually buying versus a good microSD card or a USB 3 SSD.
Why Bother: What NVMe Actually Buys You
A typical A2-rated microSD card tops out somewhere around 90-100 MB/s sequential read and considerably less on random 4K reads, which is the access pattern that actually matters for OS responsiveness, package installs, and database-heavy workloads like Home Assistant, Frigate, or a self-hosted Immich instance. A budget NVMe drive on the Pi 5's single PCIe 2.0 lane is bandwidth-capped around 500 MB/s in practice, but the bigger win is random I/O and latency — boot times routinely drop by more than half, and anything doing lots of small file writes (a database, a container image store, Docker layers) stops stalling on card wear leveling.
Hardware Options
The Pi 5 doesn't have an onboard M.2 slot — you need a HAT that breaks out the PCIe FPC connector into an M.2 socket. The common options in this space:
- Official Raspberry Pi M.2 HAT+ — clips onto the Pi 5's mounting holes, supports 2230/2242 M.2 drives, uses the official case-compatible form factor.
- Pimoroni NVMe Base — sits underneath the Pi, supports longer 2280 drives, includes a standoff kit.
- Pineboards HatDrive (several variants) — some route the PCIe lane to a second port for combining with other HATs.
- Geekworm X1001/X1011 — budget-friendly, works but check current draw and cooling for the drive.
Whichever you pick, check two things before buying a drive: physical clearance in your case (2230/2242 vs 2280 length), and power draw — some higher-performance NVMe drives pull more current under load than the Pi 5's PCIe rail is comfortable supplying without a powered HAT or the official 27W USB-C supply.
Step 1: Update the Bootloader EEPROM
PCIe boot support requires a recent bootloader. On a fully updated Raspberry Pi OS (Bookworm or later):
sudo apt update && sudo apt full-upgrade sudo rpi-eeprom-update -a sudo rebootConfirm the bootloader is current enough with sudo rpi-eeprom-update — you want a release from 2023-12-06 or later, since that's when stable PCIe boot support landed.
Step 2: Enable PCIe and Set Boot Order
Run sudo raspi-config, then under Advanced Options > Bootloader Version select the latest stable release, and under Advanced Options > Boot Order choose NVMe/USB boot. Alternatively, edit the EEPROM config directly:
sudo rpi-eeprom-config --editand set:
BOOT_ORDER=0xf416 PCIE_PROBE=1The PCIE_PROBE=1 line matters — without it the firmware won't scan the PCIe bus at boot at all. Some early third-party HATs also need a Gen2 speed cap; if you get intermittent boot failures, add dtparam=pciex1_gen=2 to /boot/firmware/config.txt before troubleshooting anything else, since a handful of drives don't negotiate Gen3 reliably on the Pi 5's implementation.
Step 3: Get the OS onto the Drive
Two practical paths:
- Flash directly: connect the NVMe drive to a USB-to-M.2 enclosure on another computer and flash Raspberry Pi OS to it with Raspberry Pi Imager, then move the drive into the HAT.
- Clone an existing install: boot the Pi normally from microSD with the drive installed in the HAT, then use Raspberry Pi Imager's "Erase" plus a clone tool, or simply rpi-clone, to copy the running system over. This is the less error-prone path if you've already got a working setup you don't want to rebuild.
Once the drive has a valid partition table and the boot order prioritizes NVMe, pull the microSD card and reboot — the Pi will boot straight from the SSD.
Real-World Numbers
StorageSequential ReadRandom 4K ReadCold Boot to Login A2 microSD card (good quality)~95 MB/s~3,000 IOPS~28-32s USB 3.0 SATA SSD (via adapter)~350 MB/s~15,000 IOPS~18-20s NVMe SSD via PCIe (Gen2 x1)~450-500 MB/s~40,000+ IOPS~10-13sNumbers vary by drive controller and HAT, but the shape of the result is consistent: the PCIe link is bandwidth-limited to roughly SATA-SSD territory by the single lane, but random I/O and latency improve dramatically over both alternatives, which is what you actually feel day to day.
Common Gotchas
- Drive not detected at all: almost always PCIE_PROBE=1 missing from the EEPROM config, or a bootloader older than the December 2023 release.
- Boots but randomly drops the drive under load: power delivery. Cheap HATs without their own regulation can starve a power-hungry NVMe drive when the CPU is also under load. Try the Gen2 speed cap first; if that doesn't help, it's a power budget problem.
- Case doesn't close: check drive length against your specific HAT before ordering — 2280 drives physically will not fit some stacked HAT designs.
- Thermal throttling on the drive: NVMe controllers can get warm in a passive case; a small heatsink sticker (many drives ship with one) is worth using since the HAT rarely provides airflow over the M.2 socket.
For most home-server style Pi 5 projects — Frigate, Home Assistant, a NAS, a K3s node — NVMe boot is one of the highest-value upgrades available, well ahead of chasing clock speed. It's also worth pairing with the official 27W USB-C power supply, since marginal power delivery is the single most common cause of the intermittent problems people report after adding a HAT.