← How-Tos
raspberry-pi Jul 30, 2026 ◑ 13 views ◯ 5 min read

Booting Raspberry Pi 5 from NVMe SSD: PCIe Setup, Boot Order, and Real-World Performance

raspberry pi 5nvmepciessdm.2booteepromssd hatperformancestorage

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:

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 reboot

Confirm 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 --edit

and set:

BOOT_ORDER=0xf416 PCIE_PROBE=1

The 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:

  1. 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.
  2. 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-13s

Numbers 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

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.