🛠 Démarrer sur un SSD NVMe et récupérer un bootloader cassé

Raspberry Pi 5 (model-5) · avance · Schéma : IMG-model-5-avance-1-model5-a1-boot-nvme-recouvrement.svg — Raspberry Pi 5 avec HAT M.2 et SSD NVMe sur connecteur FPC PCIe, câble USB-C vers un PC pour le mode recouvrement rpiboot

Objectives

Install the system on an NVMe SSD connected to the PCIe 2.0 ×1 (FPC) connector of the Raspberry Pi 5, configure the EEPROM bootloader boot order, and learn how to restore a bootloader to a working state via USB recovery mode (rpiboot) in case of a bricked device.

Hardware

Complete code

# 1) Activer le contrôleur PCIe côté OS
sudo raspi-config -> Advanced -> PCIe -> Boot Original Firmware
# ou manuellement dans /boot/firmware/config.txt :
grep -q '^dtparam=pciex1$' /boot/firmware/config.txt || \
  echo 'dtparam=pciex1' | sudo tee -a /boot/firmware/config.txt

# 2) Copier le système en cours sur le NVMe (après redémarrage)
sudo apt install -y nvme-cli rsync
lsblk | grep nvme
sudo rsync -aHAXx --info=progress2 / /mnt/nvme/   # NVMe monté, /boot inclus

# 3) Ordre de boot EEPROM : SD -> USB -> NVMe, et sonde PCIe sans HAT+
sudo rpi-eeprom-config --edit
#   BOOT_ORDER=0xf416
#   PCIE_PROBE=1
sudo rpi-eeprom-config | grep -E 'BOOT_ORDER|PCIE_PROBE'

# 4) Recouvrement : bootloader EEPROM effacé/cassé
#   Éteindre, maintenir le bouton PWR_ON, brancher USB-C vers le PC, puis :
sudo rpiboot -d /usr/share/rpiboot/msd
#   La carte apparaît comme lecteur USB : réécrire l'EEPROM avec
#   Raspberry Pi Imager -> Bootloader administration (ou rpi-eeprom-update).

Expected verification

After rebooting, lsblk shows the root on /dev/nvme0n1 and dmesg | grep -i nvme traces the PCIe enumeration. Booting occurs without a microSD card. In recovery mode, lsusb on the PC detects a "BCM2835 Boot ROM" device and the MSD volume appears.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials