🛠 Boot sur SD ou USB et procédure de recouvrement

Raspberry Pi 3 Model B+ (2018) — Board Sheet · avance · Schéma : IMG-model-3b-plus-avance-1-model3bp-boot-sd-usb-recouvrement.svg — Carte avec fente microSD et clé USB branchée, flèches de priorité de démarrage et fichier bootcode.bin en évidence

Objectives

Understand the 3B+ boot chain: unlike the Pi 4/5, it has no boot EEPROM — the first stage bootcode.bin is read from the microSD card's boot partition, and the BCM2837B0 ROM can also boot from USB storage and over the network (PXE enabled by default). You will learn how to write an image, switch from SD to USB, and recover a card with a corrupted boot partition.

Hardware

Complete code

# 1. Ecrire une image (depuis le poste de travail)
imager write --device /dev/sdX raspberry-pi-os-lite.img   # ou Imager graphique
# Verifier le device AVANT : lsblk ; dd efface sans prevenir.

# 2. Boot USB : la 3B+ tente le microSD puis le stockage USB.
#    Graver la meme image sur la cle ; retirer la carte SD pour forcer l'USB.

# 3. Recouvrement d'une partition boot corrompue :
#    - monter la partition FAT sur le poste de secours
sudo mount /dev/sdX1 /mnt
#    - restaurer uniquement les fichiers de boot (kernel + bootcode.bin)
sudo cp -n /mnt-recouvre/boot/* /mnt/ 2>/dev/null || true
#    - ou réécrire bootcode.bin / start.elf depuis une image propre
sync && sudo umount /mnt

# 4. PXE (boot reseau) : actif par defaut sur 3B+ (ROM BCM2837B0).
#    Cote serveur : dnsmasq + TFTP avec les fichiers de boot en racine TFTP.

Expected verification

With the written image, the board boots (activity LED, SSH accessible). Without an SD card but with the written USB drive, it also boots. After recovery, the green LED eventually shows a normal pattern and uname -a responds over SSH. A green LED that is off = no bootcode.bin read; regular blinking = kernel not found.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials