🛠 Booter sur NVMe, eMMC ou SD et récupérer une carte bloquée
Objectives
Install the system on the NVMe M.2 SSD (PCIe 3.0 x2, approximately 1600 MB/s measured at launch) and master the specific boot chain of the M1: RK3568 Boot ROM, 16 MB SPI NOR flash preloaded with Petitboot, and the physical SPI Boot Select switch. Also know how to revert (using a backup SD card).
Hardware
- ODROID-M1, NVMe M.2 SSD, microSD card with Armbian (archive.armbian.com/odroidm1)
- 12 V/2 A power supply; access to the serial console or HDMI to observe the boot process
- >
Complete code
#!/usr/bin/env bash
set -euo pipefail
# 1) Démarrer sur la SD, vérifier que le NVMe est vu (nvme0n1)
lsblk -o NAME,SIZE,MODEL,TRAN
sudo apt-get install -y nvme-cli && sudo nvme list
# 2) Copier le système SD vers le NVMe avec le bootloader
sudo armbian-install -o current -t nvme
# 3) Éteindre, mettre le switch SPI Boot Select en position SPI,
# retirer la SD, rallumer : Petitboot propose l'entrée NVMe.
sudo poweroff
# Récupération : switch en position non-SPI + SD Armbian neuve
# -> la carte reboote sur la SD, le NVMe reste lisible pour diagnostic.
Expected verification
After removing the SD card, the system boots on /dev/nvme0n1 (df -h /, lsblk shows the root on nvme0n1); a read dd reaches several hundred MB/s, consistent with PCIe 3.0 x2.
Common errors
- Forgetting to toggle the SPI Boot Select: with Petitboot active, the SD/eMMC behavior surprises users.
- Removing the SD card before installing the bootloader on the NVMe: no bootable system remains.
- SSD too long for the M.2 port: supported lengths are not confirmed by accessible sources (some mention 42 mm, CNX tests show 2280).
- Unstable power supply during bootloader writing: corruption, restart from the SD card.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash