Tutorials 11 min read

Boot a Raspberry Pi 5 on NVMe SSD in 2026: The Complete Guide

Boot a Raspberry Pi 5 from an NVMe SSD with the official M.2 HAT+: 2230/2242 sizes, bootloader update, cloning or Imager, BOOT_ORDER in the EEPROM, Gen 3 and troubleshooting.

S By Selfhostr · no sponsored content
Boot a Raspberry Pi 5 on NVMe SSD in 2026: The Complete Guide
This article may contain affiliate links (no extra cost to you, it funds the site). As an Amazon Associate, Selfhostr earns from qualifying purchases. See the disclosure.

👍 What we like

  • Official procedure documented by Raspberry Pi, with no manual partitioning.
  • An SSD is more durable and more responsive than a microSD card for a Pi that runs 24/7.
  • The microSD stays available as a fallback thanks to the boot order.

👎 What to watch

  • PCIe 2.0 x1 link only. Gen 3 is possible, but the Pi 5 isn't certified for that speed.
  • 2230 and 2242 only: most retail 2280 SSDs are ruled out.
  • The standard HAT+ only fits the official case with the lid and fan removed.
📑 Contents ▾

To boot a Raspberry Pi 5 from an NVMe SSD, the official route is the Raspberry Pi M.2 HAT+ with an M.2 (M-key) NVMe SSD in the 2230 or 2242 form factor. The Compact version of the HAT only takes 2230. You prepare everything from a microSD card, copy the system to the SSD, then change the boot order in the bootloader EEPROM. That setting does not go in config.txt. This approach makes sense if your Pi runs around the clock (Home Assistant, Pi-hole, a small NAS, Docker containers) and the SD card’s slowness and wear are a problem. One thing to know before you buy: the Pi 5’s PCIe link is 2.0 x1, with a 500 MB/s peak transfer rate. A high-end SSD gains you nothing here. The Samsung 990 PRO 4 To (4 TB), which is a 2280 drive, doesn’t even fit the official HAT+. The SanDisk Extreme microSDXC A2 128 Go (128 GB) card, on the other hand, is still useful: it handles the first boot, then serves as a rescue card.

The specifications and commands below come from Raspberry Pi’s official documentation (M.2 HAT+, hardware and bootloader, Raspberry Pi OS) and from Samsung’s 990 PRO 4TB product page. They were checked in November 2026. Selfhostr has not tested these products.

What fits the M.2 HAT+, and what doesn’t

ItemOfficial value
Pi 5 PCIe linkPCIe 2.0 x1 (5 GT/s) by default, through an FPC connector
Stated peak transfer rate for the HAT+500 MB/s
SSD form factors, M.2 HAT+2230 and 2242, M key
SSD form factors, M.2 HAT+ Compact2230 only
Current supplied to the SSDup to 3 A
Minimum bootloaderdated December 6, 2023 or later
PCIe Gen 3possible, but the Pi 5 is not certified for that speed

Here’s what that table means in practice:

  • Length decides everything. The Samsung 990 PRO 4TB is an M.2 2280 PCIe 4.0 x4 drive. Samsung rates it at 7,450 MB/s reads. It’s too long for both versions of the official HAT+. With a third-party adapter built for 2280 drives, the x1 link would still cap it far below its rated speed. The heatsink version also has a size problem. This SSD belongs in a PC, a mini PC or a NAS, not a Pi 5. For comparisons, see our guide to NVMe SSDs for servers and homelabs.
  • Rated speed is the wrong yardstick. Past 500 MB/s, extra SSD speed does nothing on this link. On a Pi, the gains over a microSD card are mostly in random access and endurance. So pick the right form factor first (2230 or 2242), then capacity and rated endurance (TBW).
  • No M.2 SATA SSDs. The HAT+ only supports M-key NVMe drives.
  • Case and cooling. The standard HAT+ sits over the official Active Cooler. It only fits the official Pi 5 case if you remove the lid and the included fan. The HAT+ Compact is the reverse: it fits around the case fan but can’t go under the Active Cooler.
  • Power. The Pi 5 needs a USB-C supply of at least 5 V / 3 A to boot. Raspberry Pi recommends its 27 W supply. On a 3 A supply, the Pi limits USB peripherals to 600 mA. That matters if you plan to add USB drives alongside the SSD.

What about an SSD in a USB enclosure instead of the HAT? It works, but on a 3 A supply the documentation says USB boot is disabled by default. You have to add usb_max_current_enable=1 to /boot/firmware/config.txt. The HAT+ avoids this and keeps the USB ports free.

Step 1: Update the system and bootloader from the microSD

Boot the Pi from the microSD with 64-bit Raspberry Pi OS. The current release is based on Debian Trixie, the previous one on Bookworm. Do this before fitting the HAT:

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

The CURRENT line shows the bootloader date. It must be December 6, 2023 or later. If it’s older, go to sudo raspi-config → Advanced Options → Bootloader Version → Latest, then run:

sudo rpi-eeprom-update -a
sudo reboot

Step 2: Fit the HAT+ and the SSD, then check detection

Shut the Pi down (sudo poweroff) and unplug the power supply. Always connect or remove the SSD with the power off.

  1. If you have the Active Cooler, fit it first. Then screw in the spacers.
  2. Press the 16 mm GPIO header onto the pins. It goes on either way round. The Compact version doesn’t have one.
  3. Open the latch on the Pi’s PCIe port. Insert the ribbon cable with the metal contacts facing the USB ports, then close the latch.
  4. Place the HAT+ on the spacers and screw it down. On the HAT side, insert the ribbon cable with the copper contacts facing up, then lock it.
  5. Remove the SSD retaining screw. Slide the SSD in at a slight upward angle, without forcing it. Press it flat and screw it back in without overtightening.

Reconnect power, boot from the microSD and check detection:

ls -l /dev/nvme*
lsblk -o NAME,SIZE,MODEL,TYPE,MOUNTPOINTS

You should see /dev/nvme0n1 next to the microSD (mmcblk0, mounted on / and /boot/firmware). A new SSD has no partitions. It’s normal for it not to show up on the desktop and for sudo blkid to show no UUID for it.

Step 3: Copy or install Raspberry Pi OS on the SSD

⚠️ The methods below erase everything on the SSD. First identify the target: nvme0n1, with your SSD’s size and model. Never pick mmcblk0, the card the system is running from.

lsblk -o NAME,SIZE,MODEL,MOUNTPOINTS

Method A: clone the microSD with SD Card Copier (Desktop edition). This keeps your current system and its settings. Open Menu → Accessories → SD Card Copier. Pick the microSD as the source (Copy From Device) and the SSD as the target (Copy To Device). Tick New Partition UUIDs before clicking Start. Raspberry Pi OS identifies the root partition by its PARTUUID. If the card and the SSD keep the same identifiers, the system can load part of the boot from one drive and the root filesystem from the other.

Method B: clean install with Raspberry Pi Imager. This is the method the HAT+ documentation cites. On the Pi (Desktop), install Imager if it’s missing:

sudo apt install -y rpi-imager

Choose Raspberry Pi 5, then Raspberry Pi OS (64-bit) or a Lite variant, then the NVMe SSD as storage. Set the hostname, user and SSH in the customization options, then write the image. You can also write the SSD from another computer, using a USB M.2 NVMe enclosure. The documentation also mentions the Network Installer when the bootloader is up to date.

Command-line variant (Lite), once you’ve checked the target:

wget -O raspios-lite-arm64.img.xz https://downloads.raspberrypi.com/raspios_lite_arm64_latest
xzcat raspios-lite-arm64.img.xz | sudo dd of=/dev/nvme0n1 bs=4M status=progress conv=fsync

This variant applies no customization (user, SSH). If you have no monitor or keyboard, use Imager instead.

To check the result:

sudo partprobe /dev/nvme0n1
lsblk -o NAME,SIZE,FSTYPE,LABEL /dev/nvme0n1

You should get two partitions: nvme0n1p1 as vfat (label bootfs) and nvme0n1p2 as ext4 (label rootfs).

Step 4: Change the boot order in the EEPROM

With no SD card inserted, the Pi 5 boots from NVMe on its own. If you plan to remove the microSD, just shut the Pi down and take it out. If you’d rather leave it in as a fallback, set the boot order.

With raspi-config: Advanced Options → Boot Order, choose the NVMe/USB option, then Finish and reboot.

With the EEPROM configuration editor:

sudo rpi-eeprom-config --edit

Add or change the following line, save, then reboot:

[all]
BOOT_ORDER=0xf416
sudo reboot

The value is read right to left: 6 = NVMe, 1 = SD card, 4 = USB mass storage, f = restart. So the Pi tries the SSD first, then the SD card if the SSD doesn’t respond. The M.2 HAT+ follows the HAT+ specification and is detected automatically. Do not add PCIE_PROBE=1: it’s only for PCIe boards that don’t follow HAT+. Those boards also need dtparam=pciex1 in config.txt, because the PCIe connector isn’t enabled by default without a HAT+ device.

Step 5 (optional): Force PCIe Gen 3

By default the link runs at Gen 2.0. You can force Gen 3.0, but Raspberry Pi states that the Pi 5 is not certified for that speed and the connection may be unstable. For a system that runs 24/7, stability matters more than throughput. If you want to try anyway, use sudo raspi-config → Advanced Options → PCIe Speed, or add this to /boot/firmware/config.txt:

[all]
dtparam=pciex1_gen=3

There’s a catch: once the Pi boots from the SSD, /boot/firmware is the SSD’s boot partition. If you added the line on the microSD before using method B, it isn’t on the SSD. With method A, it was copied over. If you get I/O errors or freezes, remove the line and reboot.

Check that the Pi is really running from the SSD

findmnt -n -o SOURCE /
findmnt -n -o SOURCE /boot/firmware
sudo rpi-eeprom-config | grep BOOT_ORDER
df -h /

Expected results: /dev/nvme0n1p2 for /, /dev/nvme0n1p1 for /boot/firmware, and BOOT_ORDER=0xf416 if you set it. If / shows mmcblk0p2 while the microSD is still inserted, you probably cloned without New Partition UUIDs. If / is much smaller than the SSD, expand the partition. Depending on your raspi-config version, the option is under Advanced Options (Expand Filesystem).

For read throughput and SSD health:

sudo apt install -y hdparm nvme-cli
sudo hdparm -t /dev/nvme0n1
sudo nvme smart-log /dev/nvme0n1

hdparm can’t exceed the ceiling of the PCIe x1 link, whatever the SSD. smart-log gives the temperature, wear (percentage_used) and media errors. Check these values now and then, especially if the Pi sits in a closed case.

Keep a way out after the switch

  • Keep the microSD in a drawer, or in the Pi with BOOT_ORDER=0xf416. If the SSD or the ribbon cable fails, you can boot from the card to troubleshoot.
  • If an EEPROM setting stops the Pi from booting at all, the documentation provides a reset. In Raspberry Pi Imager, choose Misc utility images → Bootloader → SD Card Boot, write the image to an SD card and boot from it.
  • An SSD is not a backup. A Pi that hosts services needs a copy of its data somewhere else. Our 3-2-1 backup with restic guide applies as is.
  • Keep things updated: the system and the bootloader (sudo apt full-upgrade, sudo rpi-eeprom-update). The rpi-eeprom-update service also applies new bootloader releases at startup.

What most often goes wrong

No /dev/nvme*. Usually the ribbon cable is the wrong way round or not latched at one end, the SSD isn’t fully seated, or the bootloader predates December 2023. Cut the power, reinsert the cable at both ends as described in step 2, then update the bootloader.

The Pi still boots from the microSD. The default order (0xf41) tries the SD card first. Set BOOT_ORDER or remove the card.

Random I/O errors or freezes. Remove dtparam=pciex1_gen=3 if it’s there and check the power supply. If the problem persists at Gen 2, Raspberry Pi asks you to open an issue on the rpi-eeprom GitHub repository, with the boot messages attached.

The SSD won’t fit. If it overhangs the HAT, it’s a 2280. No setting will change that.

Frequently asked questions

Is this setup enough for a NAS?

For a light NAS with a single SSD, yes. The HAT+ has one slot, and everything goes through the same x1 link. If you want several drives or redundancy, read our guide to building a NAS with a Raspberry Pi 5. That guide has nothing to do with SSD caching on an off-the-shelf NAS, which is covered in adding an NVMe SSD cache to your NAS.

A Pi 5 on NVMe or a mini PC?

Once you add the HAT, an SSD, the 27 W supply and cooling, a mini PC is worth comparing. It offers a 2280 M.2 slot and a wider link. The Raspberry Pi 5 vs N100/N150 mini PC comparison covers both options.

Can the root filesystem be F2FS or XFS?

Raspberry Pi OS uses ext4 for the root filesystem. Any other filesystem means changing the boot setup, and nothing like that is officially documented. Keep ext4 for / and use another format for a data partition if you need one.

Key facts

2.0 x1, 500 MB/s peak
PCIe link
2230 / 2242 (M key, NVMe)
SSD sizes
December 6, 2023
Minimum bootloader
BOOT_ORDER=0xf416
Boot order

Our picks

Affiliate links · same price for you
Recommended
Raspberry Pi M.2 HAT+

Raspberry Pi M.2 HAT+

View on Amazon

Amazon · price and availability on the listing

Essential
📦

SanDisk Extreme microSDXC A2 128 Go

View on Amazon

Amazon · price and availability on the listing

High Performance
📦

Samsung 990 PRO 4 To

View on Amazon

Amazon · price and availability on the listing

See all our recommended gear in the shop.

Tags: raspberry pissd nvmeselfhostinghomelabboot ssd

Related

Tutorials

Create a Raspberry Pi 5 NAS in 2026: Complete Guide

Guide for 2026 to transform a Raspberry Pi 5 into a high-performance NAS. Step-by-step guide on case, NVMe SSD, Docker, Samba setup and security for reliable self-hosting.

Read
Tutorials

Metal Rack Assembly for Home Lab 2026: Step-by-Step Guide

Discover our comprehensive and detailed tutorial to install a metal rack in 2026. Follow our practical tips, complete configuration files, and exact commands.

Read
Tutorials

Build a TrueNAS SCALE NAS in DIY Style for 2026: A Comprehensive Guide

Build a DIY NAS on TrueNAS SCALE (Debian) in 2026: assembly in a Jonsbo N4 or Node 304, install drive, ZFS pool created in the web UI, SMB share, built-in Docker apps and hardening.

Read