🛠 Graver une carte SD et récupérer un système cassé
Objectives
Master the complete storage lifecycle of the Orange Pi PC: properly burn an Armbian image to microSD, understand the Allwinner BROM boot order, and above all, know how to restore the board after a broken system. Good news specific to this model: the PC has neither eMMC nor SPI NOR, only microSD exists — a corrupted bootloader can therefore always be recovered by re-burning the card, without any special download mode.
Hardware
- Orange Pi PC, 5 V / 2 A power supply (DC jack)
- Quality Class 10 microSD card (the manufacturer recommends SanDisk; the officially announced capacity is 32 GB, CNX says up to 64 GB)
- Card reader on a Windows/Linux PC
- Armbian image for orangepi_pc (Debian Trixie or Ubuntu Resolute, .xz archive)
Complete Code
- Burn under Linux (or balenaEtcher graphically, Win32DiskImager under Windows):
# Identifier LE bon périphérique (périphérique entier, pas une partition !)
lsblk -d -o NAME,SIZE,MODEL,REMOVABLE
# Démonter puis écrire l'image (remplacer sdX par VOTRE carte)
xzcat Armbian_*.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
sync
- First boot: create the account, then protect the card against journal wear:
# log2ram est fourni avec Armbian : journalisation en RAM, flush périodique
sudo apt install -y armbian-config 2>/dev/null; sudo armbian-config
sudo systemctl status log2ram
- Recovery after a broken system (boot stuck, red LED frozen):
# Éteindre, retirer la carte, la re-graver avec la commande dd ci-dessus,
# la réinsérer, alimenter : le BROM du H3 amorce toujours sur le SD en premier.
# Sauvegarder le partitionnement d'une carte saine pour un reset rapide :
sudo sfdisk -d /dev/sdX > sauvegarde-partitions.sd
sudo sfdisk /dev/sdY < sauvegarde-partitions.sd
Expected Verification
After burning, the card boots up to the Armbian account creation. After voluntary corruption (sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=20), a complete re-burn restores a fresh system: the card is 100% recoverable.
Common Errors
- Writing to /dev/sdb1 instead of /dev/sdb: the image must start at the beginning of the disk.
- Cheap generic card: classic corruption under journaling load (known failure mode of the H3) — use a branded Class 10 card and keep log2ram active.
- Believing in a hardware brick when boot fails: on this model, re-burning the card always suffices; also check the power supply (DC jack, not micro-USB).
- Confusing images: take the orangepi (PC) image and not orangepi_pc2 (H5) or pc-plus.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash