Changes

Jump to navigation Jump to search

NVMe SSD boot with the Raspberry Pi 5

763 bytes removed, 28 May
-->
'''This tutorial<ref>Refer to [https://www.jeffgeerling.com/blog/2023/nvme-ssd-boot-raspberry-pi-5 NVM NVMe SSD boot with the Raspberry Pi 5]</ref> describes how to configure the Raspberry Pi OS on PI 5 to get pcie pip working'''
== Important Notes==
You also can refer to official documentatio:[https://www.raspberrypi.com/documentation/computers/raspberry-pi-5.html#enabling-pcie 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 the NVME control you are using.
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2712 (rev 21)
0001:01:00.0 Ethernet controller: Device 1de4:0001
* Make sure your NVME SSD is plugged into the PCIe PIP, not just connecting PCIe PIP to the Pi 5, otherwise the '''lspci''' will not be able to display any PCIe device.* <span class="tb_red">If your NVMe SSD is not recognized, updating the bootloader firmware is essential!</span>You can either use a terminal, and simply use the following commands Refer to update your firmware: (Firstly the Raspberry Pi 5 needs to be connected [[How to the internet) sudo apt update sudo apt upgrade rpi-eeprom-update -aIf a firmware ]] to update is available you will be prompted to install it and your Raspberry Pi will reboot. More information about updating the firmware on your Raspberry Pi is available in the [https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#bootloader_update_stable official documentation]. After updating the firmware and your SSD is still recognized, Please check or [[#FAQ]] Q1 to know more detail and try againdetailsThen run the following command to check the BOOTLOADER version: vcgencmd bootloader_versionMaybe the result is following:<pre>pi@raspberrypi:~ $ vcgencmd bootloader_version2024/04/18 09:45:00version 86ccc427f35fdc604edc511881cdf579df945fb4 (release)timestamp 1713429900update-time 1713493735capabilities 0x0000007f</pre>'2024/04/18' is the firmware version;
==Flash OS onto NVME SSD==
# Choose the drive (connected through your adapter) to flash
# Click write (and set any options you'd like)
# Once you have finished flashing the OS, DON'T remove the nvme SSD. You need to change the config.txt in the root directory of the NVME SSD drive to '''enable pcie''' (<span class="tb_blue">edit config.txt and add 'dtparam=pciex1'</span> on the end of file), this is very important and too many people forget thismust [[#Enable PCIe]].
Then pull the NVMe drive, attach it to your Pi 5, and it should boot off it (with or without a microSD card inserted)—assuming you have the bootloader up to date and set the '''BOOT_ORDER''' appropriately!
<span class="tb_red">'''NOTE:'''</span>
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==
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:
* Use tool '''raspi-config''' to set boot order sudo raspi-configThen select '''6 Advanced Opitions''' => '''A4 Boot Order''' => '''B2 NVMe/USB Boot''' answer '''Yes''', then <code>sudo reboot</code>* Run the following command to edit the EEPROM on the Raspberry Pi 5set boot order.
sudo rpi-eeprom-config --edit
Then change the BOOT_ORDER line to the following:
BOOT_ORDER=0xf416
- Press '''Ctrl-O''', then enter, to write the change to the file.
- Press '''Ctrl-X ''' to exit nano (the editor).
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!

Navigation menu