How to Boot Raspberry Pi 5 from NVMe SSD: Complete Technical Tutorial
The Raspberry Pi 5 features a native PCIe x1 interface, allowing users to install an NVMe HAT and boot the system directly from an M.2 NVMe SSD. Compared with microSD cards, NVMe storage delivers faster read/write speeds, better endurance and larger capacity, making it ideal for NAS, media servers, 24/7 self-hosted services and heavy-load projects.
This technical guide covers official configuration commands, PCIe activation, bootloader modification, PCIe Gen3 settings, disk speed testing, and common SSD compatibility troubleshooting.
Required Hardware
• Raspberry Pi 5 • Raspberry Pi 5 PCIe NVMe HAT • M.2 NVMe SSD (NVMe protocol, SATA M.2 is unsupported) • Official 5V 5A USB-C Power Supply
1. Detect your PCI device
After physical installation of the NVMe HAT and SSD, run the command below to verify hardware recognition:
$ lspci
If your NVMe SSD is connected properly, the NVMe controller device will show up in the output list.
If no NVMe device appears, check the FPC cable connection, SSD installation, and power supply first.
2. Enable PCIe
To enable the connector, add the following line to /boot/firmware/config.txt:
$sudo nano /boot/firmware/config.txt
add the following line
dtparam=pciex1
dtparam=nvme
Reboot with sudo reboot for the configuration changes to take effect.
Note: You can also use the alias nvme.
3. Boot from PCIe
By default, Raspberry Pi devices do not boot from PCIe storage. To enable boot from PCIe, change the BOOT_ORDER in the bootloader configuration. Edit the EEPROM configuration with the following command:
$ sudo rpi-eeprom-config --edit
Replace the BOOT_ORDER line with the following line:
BOOT_ORDER=0xf416
To boot from a non-HAT+ device, also add the following line:
PCIE_PROBE=1
After saving your changes, reboot your Raspberry Pi with sudo reboot to update the EEPROM.
4. PCIe Gen 3.0
Important Warning
The Raspberry Pi 5 is not certified for Gen 3.0 speeds. PCIe Gen 3.0 connections may be unstable.
The connection is certified for Gen 2.0 speeds (5 GT/sec), but you can force Gen 3.0 (10 GT/sec) speeds. To enable PCIe Gen 3.0 speeds, add the following line to /boot/firmware/config.txt:
dtparam=pciex1_gen=3
Reboot your Raspberry Pi with sudo reboot for these settings to take effect.
5. Write Speed Test
dd command can be used to test write speed.
The following command will write into a 2000MB file named “test” to disk:
$ dd if=/dev/zero of=./test bs=10M count=200
6. SSD Compatibility Issues & Solutions
Prerequisite: Only M.2 KEY NVMe protocol SSDs are supported. Many users encounter SSD compatibility problems. Follow these troubleshooting steps one by one:
Solution 1: Upgrade your system to the latest
$ sudo apt update
$ sudo apt upgrade
$ sudo rpi-eeprom-update
Restart
Check the current bootloader version with the following command:
$ vcgencmd bootloader_version
2024/06/05 16:41:49
version 6fe0b091c7cb1c5da26b7f41cc24c42840531a83 (release)
timestamp 1717602109
update-time 1720508793
capabilities 0x0000007f
Solution 2: Swap to a Different Model of NVMe SSD
Solution 3: Notes on NVMe HAT Hardware
Our NVMe HAT is only a passive PCIe adapter board and does not control SSD compatibility. Compatibility is determined by the Raspberry Pi 5 motherboard. We found during testing that different batches of Raspberry Pi 5 mainboards show inconsistent PCIe compatibility. One Pi 5 board may support nearly all NVMe SSDs, while another can only recognize a subset of drives. If all other methods fail, try another Raspberry Pi 5 unit from a different production batch.
Common Troubleshooting Checklist
① Insufficient power supply → Use official 5V 5A USB-C power adapter ② Loose PCIe FPC cable → Re-seat both ends firmly ③ Missing PCIe parameters in config.txt ④ EEPROM boot order not updated correctly ⑤ Overheating SSD causing intermittent disconnection – add thermal pads
Final Recommendations
NVMe boot is one of the most impactful upgrades for Raspberry Pi 5 server projects. Always update your bootloader firmware first when you meet detection issues.
If you plan to build a long-term stable NVMe boot system, match your hardware with a spacious aluminum case to maintain proper airflow for both the Raspberry Pi 5 processor and NVMe SSD.
If you have questions about parameter settings, SSD compatibility or hardware assembly, please contact us.