NVMe SSD boot with the Raspberry Pi 5: Difference between revisions

Replace <comments/> with <comment-streams />
 
(4 intermediate revisions by 2 users not shown)
Line 27: Line 27:
  sudo nano /boot/firmware/config.txt
  sudo nano /boot/firmware/config.txt
Then add the following comment;
Then add the following comment;
# Enable the PCIe External connector.
  dtparam=pciex1
  dtparam=pciex1
<!--
<!--
Line 100: Line 99:
If you are flashing a fresh Pi OS to NVME ssd, you must [[#Enable PCIe]]; but if you are COPY or CLONE an old Pi OS from SD card to NVME ssd, and you have already enabled pcie in the old Pi OS in advance, then you don't need to do enable pcie again!
If you are flashing a fresh Pi OS to NVME ssd, you must [[#Enable PCIe]]; but if you are COPY or CLONE an old Pi OS from SD card to NVME ssd, and you have already enabled pcie in the old Pi OS in advance, then you don't need to do enable pcie again!


==Set NVMe early in the boot order==
==Boot from PCIe (NVMe SSD)==
The PCIe connection should work after a reboot, but your Pi won't try booting off an NVMe SSD yet. For that, you need to change the '''BOOT_ORDER''' in the Raspberry Pi's bootloader configuration:
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:
 
* Use tool '''raspi-config''' to set boot order
sudo raspi-config
Then select '''6 Advanced Opitions''' => '''A4 Boot Order''' => '''B2 NVMe/USB Boot''' answer '''Yes''', then <code>sudo reboot</code>
* Run the following command to set boot order.
  sudo rpi-eeprom-config --edit
  sudo rpi-eeprom-config --edit
Then change the BOOT_ORDER line to the following:
Then change the BOOT_ORDER line to the following:
  BOOT_ORDER=0xf416
  BOOT_ORDER=0xf416
 
To boot from a non-HAT+ device, also add the following line:
PCIE_PROBE=1
- Press '''Ctrl-O''', then enter, to write the change to the file.
- Press '''Ctrl-O''', then enter, to write the change to the file.


- Press '''Ctrl-X''' to exit nano (the editor).
- Press '''Ctrl-X''' to exit nano (the editor).
* Or use tool '''raspi-config''' to set boot order
sudo raspi-config
Then select '''6 Advanced Opitions''' => '''A4 Boot Order''' => '''B2 NVMe/USB Boot''' answer '''Yes''', then <code>sudo reboot</code>


Read [https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#BOOT_ORDER Raspberry Pi's documentation on BOOT_ORDER] for all the details. For now, the pertinent bit is the '''6''' at the end: that is what tells the Pi to attempt NVMe boot first!
Read [https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#BOOT_ORDER Raspberry Pi's documentation on BOOT_ORDER] for all the details. For now, the pertinent bit is the '''6''' at the end: that is what tells the Pi to attempt NVMe boot first!
Line 133: Line 132:


<!--Add review function! -->
<!--Add review function! -->
<comments />
<comment-streams id="main" />


<!--Please choose the  -->
<!--Please choose the  -->