🛠 Démarrage SD/USB et récupération d'une carte qui ne boot plus
Objectives
Master the Raspberry Pi 3 A+ boot chain: the "era" firmware (bootcode.bin / start.elf / config.txt) on the FAT partition, improved USB storage boot (3B+ generation OTP), and recovery of a card without tools like rpiboot — the 3 A+ does not have an EEPROM recovery mode like the Pi 4.
Hardware
- Raspberry Pi 3 A+; microSD ≥ 8 GB; USB drive formatted as FAT32/EXT4
- SD card reader on the PC; Raspberry Pi Imager
- >
Full code
# 1) Écrire l'image (la partition boot FAT apparaît montée après écriture)
sudo rpi-imager --cli img/raspios-lite.img /dev/sdX
# 2) Démarrage USB : écrire la MÊME image sur la clé, retirer la SD,
# brancher la clé sur l'unique port USB puis alimenter.
# (OTP USB boot de génération 3B+ ; sinon une première SD avec
# le programme « raspberrypi-usb-boot » active le bit OTP.)
# 3) Récupération sans réécriture complète : la partition boot est lisible
# sur tout PC — réparer config.txt (HDMI, dtoverlay) ou cmdline.txt :
sudo mount /dev/sdX1 /mnt && sudo nano /mnt/config.txt && sudo umount /mnt
# 4) Diagnostic matériel au power-on : les LED d'activité
# LED rouge = alimentation ; LED verte clignotante = lecture SD.
vcgencmd version # version du firmware chargé
Expected verification
With a valid SD card: the green LED blinks at power-on, then the system is available via SSH. Without an SD card and with a written USB drive: USB boot succeeds if the OTP is active. vcgencmd version responds with the firmware date.
Common errors
- Looking for an rpiboot/USB recovery mode: the 3 A+ does not have one (no VL805 EEPROM like the Pi 4); recovery involves rewriting or repairing the boot partition.
- Power-hungry USB drive: the single port, protected by a polyfuse, must power both the drive and the board; prefer a low-power USB drive.
- Editing
config.txton Windows with CRLF line endings: the FAT parser is tolerant, but editors sometimes break the encoding. - SD card corrupted by a hard shutdown: run
fsckon the root partition or rewrite the image — there is no secondary fallback storage on this model.
Other tutorials for this board
Code examples for this board
led_blink.pyPythonbutton_led.pyPythonservo_sweep.pyPythondht_temp.pyPythonoled_i2c.pyPythonmcp3008_read.pyPython