🛠 Boot sur SD, USB, et récupération d'une carte muette

Raspberry Pi 2 Model B (2015) — Board Sheet · avance · Schéma : IMG-model-2b-avance-1-model2b-boot-sd-usb.svg — étapes de gravure d'une image sur microSD avec l'Imager, partition boot FAT (config.txt, cmdline.txt) et amorce USB selon la révision

Objectives

Master the end-to-end startup of the Raspberry Pi 2: burn an image, understand the FAT-partition bootloader (bootcode.bin, start.elf, config.txt — no EEPROM as on the Pi 4), know the USB boot limitation depending on the revision (v1.1: SD only; later revisions can boot from USB), and know how to repair a card that no longer boots by editing the boot partition from a PC.

Hardware

Complete code

# 1. Graver l'image (cote PC, ou en ligne de commande)
sudo dd if=2024-xx-raspios-bullseye.img of=/dev/sdX bs=4M status=progress conv=fsync
# (le plus simple reste Raspberry Pi Imager, cible : Raspberry Pi OS 32 bits)

# 2. Preparer la carte sans ecran : SSH + Wi-Fi (dongle) via partition boot
sudo mount /dev/sdX1 /mnt/boot
sudo touch /mnt/boot/ssh
printf '[wifi]\ncountry=FR\nssid="Box"\npsk="motdepasse"\n' | sudo tee /mnt/boot/wpa_supplicant.conf

# 3. Diagnostic apres un echec de boot : lire la partition boot depuis un PC
#    fichiers cles : bootcode.bin, start.elf, config.txt, cmdline.txt
sudo sed -i 's/ rootwait rw/ rootwait ro/' /mnt/boot/cmdline.txt  # lecture seule

# 4. Verifier la chaine d'amorce sur la carte
ls /mnt/boot | grep -E 'bootcode|start|config|cmdline'

Expected verification

A healthy card displays the rainbow screen followed by text boot on HDMI; the green LED blinks irregularly during SD access. In case of a corrupted cmdline.txt, modifying it from the PC (mounting the FAT partition) allows the card to reboot without reburning. On v1.1, a USB drive remains ignored at boot: this is expected.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials