🛠 Installer et booter le système sur un SSD NVMe (M.2 M-Key)
Objectives
Leverage the ROCK 3B's M.2 M-Key 2280 slot — electrically PCIe 3.0 x2 (confirmed by the mainline device tree enabling the pcie3x2 controller; the "x1" mentioned in the CNX article is a typo, as its own spec list states x2) — to install Radxa OS on an NVMe SSD and boot from it. You will also learn how to recover in MaskROM mode when the bootloader is corrupted.
Hardware
- Radxa ROCK 3B (2/4/8 GB), M.2 2280 NVMe SSD (an entry-level model is sufficient: the x2 Gen3 link caps at ~1.6 GB/s)
- USB-C PD 12 V / 2 A power supply, microSD card for initial boot
- Linux PC with
rkdeveloptool(or Windows + RKDevTool) for MaskROM mode; USB-C data cable
Full Code
# 1. Depuis Radxa OS sur microSD : vérifier vue et vitesse du lien
sudo lspci -vv | grep -A2 -i nvme # attendu : LnkSta Speed 8GT/s (Gen3), Width x2
sudo fdisk -l | grep nvme # /dev/nvme0n1
# 2. Écrire une image système directement sur le NVMe (depuis le PC) :
# balenaEtcher / Rufus / dd ciblent /dev/nvme0n1 — voir docs « Install the
# system to NVME » ; le chargeur U-Boot est posé sur la SPI NOR de la carte.
sudo dd if=radxa-os.img of=/dev/nvme0n1 bs=4M status=progress conv=fsync
# 3. Benchmark (DÉTRUIT les données du disque cible — SSD vierge uniquement)
sudo apt install fio
sudo fio --name=nvme --rw=randrw --bs=4k --size=512M --runtime=30 \
--filename=/dev/nvme0n1 --ioengine=libaio --direct=1 --group_reporting
# 4. Recouvrement si la carte ne boote plus (MaskROM) :
# éteindre -> maintenir la touche de recovery -> USB-C vers le PC ->
# lsusb : « Rockchip USB Peripheral » ; puis rkdeveloptool ld / wl / rst.
# Si le bootloader SPI est vérouillé : page docs « Clear SPI Flash manually ».
Expected Verification
After rebooting without the microSD card: lsblk shows / on /dev/nvme0n1, lspci displays the link at 8 GT/s with x2 width, and fio significantly outperforms SATA (up to ~1.5 GB/s sequential depending on the SSD). In MaskROM mode, lsusb lists the Rockchip device and rkdeveloptool ld responds.
Common Errors
- Using a SATA SSD in the M-Key slot (this is an NVMe/PCIe slot; SATA is on the B-Key cellular socket) — verify the 2280 form factor.
- Expecting 3.5 GB/s: the link is PCIe 3.0 x2, not x4 — half the bandwidth.
- MaskROM mode is finicky on this board (per forum reports): insist on the button + USB timing, retry the operation with the board powered off, and as a last resort, follow the official "Clear SPI Flash manually" page.
- Forgetting that the bootloader resides in the SPI NOR: reformatting the SSD without rewriting the full image leaves the board unresponsive.
- Running
ddon the wrong disk: checklsblkbeforehand, as writing is destructive.
Other tutorials for this board
- Faire clignoter une LED via le GPIO avec libgpiod
- Lire un bouton poussoir en Python avec python3-libgpiod
- Premier réseau : Ethernet double gigabit, Wi-Fi optionnel et SSH
- Interroger un capteur I2C sur le connecteur 40 broches
- Surveiller température et fréquence CPU, piloter le ventilateur PWM
- Routeur / passerelle réseau double Gigabit avec OpenWrt et PoE
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash