With the new PCIe interface on the Raspberry Pi 5 there are now a multitude of NVMe options available to allow finally getting away from using an SD card. Swapping from an SD card to an NVMe drive on a Raspberry Pi 5 is remarkably simple and straightforward. I have used two of these and both work excellently and in the same way:
1. Argon NEO 5 M.2 NVME Case for Raspberry Pi 5
2. Raspberry Pi M.2 HAT+
Both available from my favourite Raspberry Pi vendor The PiHut and elsewhere.
The method is the same for both and here i assume you are using a Raspberry Pi 5 running of an existing SD card.
For this procedure ensure you have your Raspberry Pi set to Boot to Desktop as we will be making use of desktop features later on in this process. I always set all my Raspberry Pi 5’s to Boot to Desktop and disable Auto Login for ease of use later if problems arise at any point.
First ensure your Raspberry Pi is up to date
sudo apt update && sudo apt upgrade -y
Check the boot loader version
sudo rpi-eeprom-update
You should get something back like this:
BOOTLOADER: up to date
CURRENT: Wed 5 Jun 15:41:49 UTC 2024 (1717602109)
LATEST: Wed 5 Jun 15:41:49 UTC 2024 (1717602109)
RELEASE: latest (/lib/firmware/raspberrypi/bootloader-2712/latest)
Use raspi-config to change the release.
This should be later than December 2023. If not you will need to update the boot loader first by following these instructions. Then proceed with the following:
Power down the Raspberry Pi
sudo shutdown -h now
Remove the power cable from the Raspberry Pi and install the NMVe HAT/case and drive then power up your Raspberry Pi and login to the Raspberry Pi via the desktop.
Power up your Raspberry Pi and login via the desktop then from Start -> Accessories -> SD Card Copier Copy your SD card onto the NVMe drive.
Select /dev/mmcblk0 as the Copy From device. This is your current SD card
Select /dev/mmcblk0 as the Copy From device. This is your current SD card
Now go into raspi-config
sudo raspi-config
And navigate to Advanced Options -> Boot Order -> NVMe/USB Boot
You should now be able to remove the SD card and boot directly from the NVMe drive. This will be MUCH faster
Additionally you can also enable the experimental (not officially supported) PCIe 3 Mode to speed things ueven further. I have had no problems with this on any of mine. To do this you need to edit config.txt
sudo nano /boot/firmware/config.txt
And add the following to the [all] section at the end
[all]
dtparam=pciex1_gen=3