The Homelab Bench
Real Raspberry Pi & self-hosting builds, actually tested.

2026-07-09

How to Boot a Raspberry Pi 5 from NVMe (Step by Step)

The Raspberry Pi 5 can boot directly from an NVMe SSD with no microSD card inserted — you just need to update the bootloader and flash your OS to the drive. This guide covers every step using my own build: a Pi 5 8GB running a Fanxiang S501Q 512GB, which hits 453 MB/s sequential reads and 16,433 random read IOPS on the default PCIe Gen 2 link.

What You Need

Step 1: Assemble the Hardware

Power off the Pi. Connect the flat FPC ribbon cable from the Pi 5's PCIe connector to the M.2 HAT+. Seat your NVMe drive into the M-key slot at a slight angle, press it down, and secure with the standoff screw at the appropriate length position (2230 or 2242). Stack the HAT+ on top of the Pi using the provided spacers and GPIO header extension. Double-check the ribbon cable orientation — the contacts face a specific direction marked on the HAT+ silkscreen.

Step 2: Boot from microSD and Update the Bootloader

Flash Raspberry Pi OS (or Debian, as I'm running) onto a microSD card using Raspberry Pi Imager. Insert it, boot the Pi, and open a terminal.

sudo apt update && sudo apt upgrade -y
sudo rpi-eeprom-update

Check the reported boot order. You need a bootloader from 2024-01-05 or later that supports NVMe boot. If your version is older:

sudo raspi-config

Navigate to Advanced Options → Boot Order and select NVMe/USB Boot. This sets the boot order to try NVMe first, then fall back to SD, then USB. Confirm and let it update the EEPROM. Reboot once to apply.

You can verify the change took effect:

sudo rpi-eeprom-config

Look for BOOT_ORDER=0xf416 — the 6 in that sequence means NVMe is in the boot chain. The exact hex value may vary depending on your chosen order.

Step 3: Flash the OS Directly to NVMe

With the Pi booted from the microSD and the NVMe drive connected, verify the drive is detected:

lsblk

You should see /dev/nvme0n1. On my system the Fanxiang S501Q shows up as a 476.9G block device.

Now use Raspberry Pi Imager (or dd, if you prefer) to write your OS image directly to the NVMe drive. If using the Imager GUI, select the NVMe as the target storage — be absolutely certain you're not overwriting the microSD you're currently booted from.

# Alternative: command-line flash
sudo dd if=your-image.img of=/dev/nvme0n1 bs=4M status=progress
sync

Step 4: Shut Down, Remove the microSD, and Boot

sudo shutdown -h now

Pull the microSD card. Power on. The Pi 5 bootloader will find the NVMe drive and boot from it. On my build, the boot device confirms as /dev/nvme0n1p2, running kernel 6.18.34+rpt-rpi-2712 on Debian trixie.

If it doesn't boot, reconnect the microSD, boot from it, and double-check rpi-eeprom-config to ensure the boot order includes NVMe.

Step 5: Verify and Benchmark

Once booted from NVMe, confirm everything:

mount | grep "on / "
# Should show /dev/nvme0n1p2

Here are the actual numbers from my Fanxiang S501Q on the default PCIe Gen 2 link (I did not change to Gen 3):

Metric My Measured Result
Sequential read 453 MB/s
Sequential write 438 MB/s
4K random read IOPS 16,433
SoC temp at idle 49.4 °C
SoC temp after sustained load 48.8 °C

The temperatures surprised me — the SoC actually read slightly cooler after a sustained fio workload (48.8 °C) than at idle (49.4 °C). This is within normal measurement variance and likely reflects the active cooler ramping up. The point: NVMe operation does not meaningfully increase SoC thermals on my setup.

A Note on PCIe Gen 3

The Pi 5 defaults to Gen 2. You can force Gen 3 by adding dtparam=pciex1_gen=3 to /boot/firmware/config.txt. Based on published specs, Gen 3 doubles the theoretical link bandwidth to ~800 MB/s, and some users reportedly see 800+ MB/s sequential reads on faster drives. I haven't tested Gen 3 on my build — the 453 MB/s I get on Gen 2 is already roughly 4× faster than the best microSD cards, and I value stability over peak throughput on a home server.

Who Should NOT Do This

Drive Selection Tips

I can only speak to the Fanxiang S501Q from direct testing. It's a budget DRAMless 2242 drive that performed well on Gen 2 — 453/438 MB/s sequential and solid random read IOPS for the price. For other drives: look for 2230 single-sided models if you're using the official HAT+. Popular options reportedly include the Samsung PM991a, WD SN740, and Sabrent Rocket 2230 — but I haven't benchmarked any of them on this Pi, so I won't invent numbers.

Verdict

NVMe boot on the Pi 5 is straightforward — a bootloader update, a flash, and a reboot. My Fanxiang S501Q 512GB delivers 453 MB/s reads and over 16K random IOPS on the stock Gen 2 link, which transforms the Pi 5 into a genuinely capable home server platform. If you're running containers, databases, or anything that touches storage regularly, this is the single best upgrade you can make.

← all articles

Some links are affiliate links — if you buy through them I may earn a small commission at no extra cost to you. Benchmarks are run on my own hardware.