- Mandatory EEPROM update and adjustment of boot order to prioritize NVMe.
- Enabling the PCIe Gen 3 interface using the config.txt file to maximize speed.
- Need for active cooling when applying overclocking to CPU and GPU.
- Use diagnostic tools such as lsblk and lspci to verify hardware detection.
If you've gotten your hands on the new Raspberry Pi 5, you probably already know it's a real beast compared to its predecessors. However, to get the most out of it, relying on the classic microSD card is only a small step, as read and write speeds are the most obvious bottleneck in demanding projects.
The big news about this motherboard is the inclusion of a PCIe 2.0 x1 interface, which allows us to connect NVMe SSDs. Upgrading from an SD card to a solid-state drive isn't just a luxury; it's the definitive leap for those seeking blazing-fast processing speeds , whether for setting up a home automation server, running virtual machines, or simply making their system incredibly fast.
Hardware required for assembly
To begin this adventure, not just any part will do. You need a compatible M.2 NVMe SSD and, crucially, a base or HAT (Hardware Attachment Terminal) to bridge the drive and the motherboard, such as the Pimoroni NVMe or the Argon NEO 5. While third-party options exist, the foundation has released its own official SSDs in 2230 form factor, with capacities of 256 GB and 512 GB, guaranteeing complete system stability.
Steps to configure booting from NVMe
Before tinkering with the hardware, it's vital to prepare the software. The first step is to power on the Pi with Raspberry Pi OS installed on an SD card and open the terminal. You must then run the command sudo rpi-eeprom-update -a to make sure that the boot manager is up to date to the latest version available.
Once updated, enter the settings tool with sudo raspi-configGo to the Advanced Options section, find Boot Order and select the option NVME/USB BootThis tells the motherboard not to just look for the SD card, but to try to boot from the solid-state drive.
To get everything working perfectly, you need to edit the EEPROM configuration file by running sudo rpi-eeprom-config --editHere you need to change the value of BOOT_ORDER to 0xf416 and add the line PCIE_PROBE=1 at the end of the document. Don't forget to save your changes before exiting.
Physical installation and system flashing
Before assembling the base, remember that the SSD must have the operating system installed. Use the Raspberry Pi Imager tool to flash the Pi OS image directly onto the NVMe drive. Once this is done, assembly is simple: fit the base, align the PCIe connectors , and carefully screw everything in to avoid loose connections.
How to squeeze out performance: PCIe Gen 3 and Overclocking
By default, the Pi 5 uses PCIe Gen 2, but you can force it to use PCIe Gen3 To gain more speed, edit the file. /boot/firmware/config.txt and add the line dtparam=pciex1_gen=3Keep in mind that this can generate more heat, so it's Active cooling is essential or a powerful fan.
If you want to go even further, you can perform a moderate overclock in the same file. Increase the CPU frequency to 2800 MHz with arm_freq=2800 and the GPU to 900 MHz with gpu_freq=900This is ideal for demanding tasks like video editing or machine learning, although you won't notice a huge difference when browsing the web.
Common troubleshooting
Sometimes, the system simply doesn't recognize the disk. If when running lsblk o lspci The NVMe drive doesn't appear; the first thing to check is... FPC cable physical connectionwhich is very delicate. It's also advisable to check that the power supply is adequate, since an SSD consumes more energy than an SD card.
If you encounter errors like "nvme 10" when booting, there may be a conflict with the partition block size or that the file fstab The disk may not have the correct PARTUUID. In complex cases, such as using NVMe-enabled eMMC disks, the system may detect the device but fail to load the operating system root.
The transition to solid-state storage transforms the Raspberry Pi 5 into a much more capable machine, eliminating waiting times and allowing the use of PCIe Gen 3 and overclocking to reach its full potential, provided that cooling is taken care of and the boot manager is configured correctly.
FAQ
What do I need to connect an NVMe SSD to the Raspberry Pi 5?
It is essential to have a compatible M.2 NVMe SSD and a specialized base or HAT, such as those from Pimoroni or Argon, that allows the PCIe connection.
How do I get the Raspberry Pi 5 to boot from the SSD?
The EEPROM must be updated, the boot order in raspi-config must be changed to NVME/USB, and the EEPROM configuration file must be modified with BOOT_ORDER=0xf416.
Is it possible to increase the PCIe port speed on the Pi 5?
Yes, by adding the line dtparam=pciex1_gen=3 to the config.txt file you can force the use of PCIe Gen 3 instead of Gen 2.
What to do if the Raspberry Pi does not recognize the NVMe drive?
It is recommended to check the physical connection of the FPC cable, verify the power supply, and use commands such as lspci or lsblk to diagnose the fault.
Is it dangerous to overclock when installing an SSD?
It is not dangerous if an active cooling system is available, since the increase in CPU and GPU frequencies raises the temperature of the components.
Where do I install the operating system to boot from NVMe?
The operating system must be flashed directly onto the NVMe SSD using the Raspberry Pi Imager tool before performing the physical assembly.