Skip to main content

OS -> NVMe Setup Guide

AfterThis Wikipage hase been integrated by aeoneros from the Original Source: Geekworm

 

Important Notes

Check Out the NVMe SSD Incompatibility List if you finishedhave Troubble at Booting your Device!

NVMe SSD Incompatibility List:

We recommend avoiding the following NVMe SSD drives which is equipped with a Phison controller due to their proven incompatibility:

These specific models have demonstrated compatibility issues, and NVMEit /is advisable to avoid them when considering NVMe SSD Setupoptions Processfor the X10xx series NVMe shield. You can run "lspci" icommand to check the controller brand of the SSD.

We confirm that the following SSDs are incompatible:

  • Micron 2200 256GB M.2 NVMe Gen3 x4, MODEL: MTFDHBA256TCH, The SSD is recognized but I cannot boot from it.

Also note:

  • Compatible with M.2 NVMe SSDs only, Not compatible with M.2 SATA SSDs, M.2 PCIe AHCI SSDs, or other M.2 non-NVMe devices
  • Older NVMe drives with less efficient flash media may not perform as well as newer drives
  • New NVMe SSDs are not partitioned and will nowneed provideto be both partitioned and formatted when first connected to the Raspberry Pi before they will be accessed in the Explorer.
  • We get feedback from customers that Polaris Controller will also have compatibility problems. Please replace the other SSD test if it not work, whether it is compatible with the Raspberry Pi 5 does not depend on the X100X series boards
  • NVMEs using the MAP1202 controller may not support PCIe Gen 2, and must be forced to enable PCIe Gen 3 in order to be recognised. This is due to the fact that the controller is not backward compatible with PCIe Gen 2, and NVMEs using this controller will have compatibility issues, and are not recommended for use. Can refer to https://zhuanlan.zhihu.com/p/644984347


PS: There is also feedback from buyers that even NVME SSDs with Phison controller are supported after updating the latest firmware. Please refer to go to: X1001#comment-4638

 

 

Enable PCIe

By default the PCIe connector is not enabled.

To enable it you should add the detailedfollowing Informationoption aboutinto /boot/firmware/config.txt and reboot:

sudo nano /boot/firmware/config.txt

Then add the following comment;

# Enable the PCIe External connector.
dtparam=pciex1

# This line is an alias for above (you can use either/or to enable the port).
dtparam=nvme

Press Ctrl-O, then enter, to write the change to the file.
Press Ctrl-X to exit nano (the editor).

And the connection is certified for Gen 2.0 speed (5 GT/sec), but you can force it to Gen 3.0 (10 GT/sec) if you add the following line after:

dtparam=pciex1_gen=3

WARNING:
The Raspberry Pi 5 is not certified for Gen 3.0 speeds, and connections to PCIe devices at these speeds may be unstable.

Then DON'T forgot to reboot :)

sudo reboot

You also can refer to official documentatio: Enabling PCIe
After reboot,use the lspci command to display your PCIe devices

 sudo lspci

The output is as follows, note that the content of the third line depends on howthe NVME control you are using.

root@swarmpi1:~#  sudo lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0000:01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
  • Make sure your NVME SSD is plugged into the PCIe PIP, not just connecting PCIe PIP to preparethe Pi 5, otherwise the NVMe'slspci will not be able to display any PCIe device.
  • If your NVMe SSD is not recognized, updating the bootloader firmware is essential!
    Refer to How to update eeprom firmware to update firmware or #FAQ Q1 to know more details.

 

 

Flash OS onto NVME SSD

To get the NVMe SSD to boot your Pi, it needs to have an OS, so the Raspberry Pi OS needs to be flashed onto NVME SSDs, this is very important!
Only support Raspberry Pi OS (Bookworm) version, Raspberry Pi OS bullseye or Ubuntu or Home Assistant OS is NOT supported, refer to https://www.raspberrypi.com/software/operating-systems/

Here are a few ways to flash the OS to an NVME SSD:
  1. Use SD Card Copier tool to flash OS onto the NVME SSD On Raspberry Pi OS (Recommended)
    1. Download Raspberry Pi Imager Tool on you Windows or Mac Machine and Installflash Debianthe 12.6 BookwormOS (RaspianOS)Raspberry Pi OS - 64bit) onto your Pis.SD-Card
    2. After flashing the Pi OS onto your SD-Card, insert the SD-Card into your Raspberry Pi 5 and Power the Device.
      1. Sidenote: If you Install the OS on multiple Devices i would recommend to flash the OS again onto the SD card after copying it to 1 Machine. That way you can avoid having Troubles later on.
    3. After powering your Pi & successful first boot,
      Cick Applications =>Accessories =>SD Card Copier on the main screen, run the SD Card Copier program, and copy the OS to the NVME ssd as shown in the figure below.
    4. Click Start to run. Then shut down, unplug the SD card, and restart the device.

This is a visual operation and i highly recommend it!

 800px-PI5-sd-copier.png