Why Verification Matters
Half the "my board won't boot" reports on SBC forums trace back to one of three things: a corrupted download, a bad flash, or a defective SD card. All three are preventable with a five-minute verification step that most people skip.
The failure modes are deceptive. A corrupt image might boot U-Boot but hang loading the kernel. A bad flash might boot fine ten times then fail on the eleventh. A fake-capacity SD card works perfectly until you write past the real storage boundary. Each of these looks like a hardware or software problem, but it's a media problem.
SHA-256 Checksum Verification
Every reputable image publisher provides SHA-256 checksums. Verify before flashing — always.
Linux / macOS
# Download the image and checksum file
wget https://example.com/image.img.xz
wget https://example.com/image.img.xz.sha256
# Verify
sha256sum -c image.img.xz.sha256
# Expected output: image.img.xz: OK
# If you only have the hash value (not a checksum file):
sha256sum image.img.xz
# Compare the output manually against the published hash
Windows (PowerShell)
# Get the hash
Get-FileHash .\image.img.xz -Algorithm SHA256
# Compare against the published hash
# PowerShell doesn't have a built-in "check" command,
# so compare the Hash property visually or with a script
GPG Signature Verification
Checksums verify integrity (file wasn't corrupted). GPG signatures verify authenticity (file came from the publisher). Armbian, Debian, and Ubuntu all provide GPG signatures.
Armbian images
# Download the signature
wget https://dl.armbian.com/bananapipro/archive/Armbian_24.11_Bananapipro_bookworm_current_6.6.x.img.xz.asc
# Import Armbian's signing key
gpg --keyserver hkps://keyserver.ubuntu.com --recv-key DF00FAF1C577104B50BF1D0093D6889F9F0E78D5
# Verify
gpg --verify Armbian_24.11_Bananapipro_bookworm_current_6.6.x.img.xz.asc
# Look for "Good signature from"
Debian images
# Debian provides SHA256SUMS and SHA256SUMS.sign files
wget https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/SHA256SUMS
wget https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/SHA256SUMS.sign
# Verify the signature on the checksum file
gpg --verify SHA256SUMS.sign SHA256SUMS
# Then verify the image against the signed checksum
sha256sum -c SHA256SUMS 2>/dev/null | grep "image-filename"
Safe Flashing Procedures
balenaEtcher (all platforms)
- Download balenaEtcher
- Select the verified image file (
.img.xz,.img.gz, or.img) - Select the target SD card — Etcher shows the device size, which helps catch wrong-device mistakes
- Flash — Etcher automatically verifies the flash by reading it back
- Wait for the verification pass to complete. Don't eject early.
dd (Linux/macOS)
# Identify your SD card
lsblk
# Insert the card, run lsblk again, and note which device appeared
# Unmount any auto-mounted partitions
sudo umount /dev/sdX*
# Flash
xzcat image.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
# Force all writes to complete
sudo sync
conv=fsync flag is critical. Without it, dd may report completion while data is still in the kernel's write cache. Removing the card before the cache flushes causes a corrupt flash that may boot intermittently. Always use conv=fsync and run sync afterward.
Raspberry Pi Imager (works for any SBC image)
Despite the name, Raspberry Pi Imager can flash any .img file to any SD card. Select "Use custom" when choosing the OS, and point it to your verified image file. It handles verification automatically.
Read-Back Verification After Flash
Etcher does this automatically. If you used dd, verify manually:
# Decompress the image to get the raw .img (if you haven't already)
xz -dk image.img.xz
# Get the exact image size in bytes
IMG_SIZE=$(stat -c '%s' image.img)
# Read back from the SD card and hash it
sudo dd if=/dev/sdX bs=4M count=$(( (IMG_SIZE + 4194303) / 4194304 )) | head -c $IMG_SIZE | sha256sum
# Hash the original image
sha256sum image.img
# The two hashes MUST match
If they don't match:
- The SD card may have bad blocks — try a different card
- The card reader may be unreliable — try a different reader
- The card may be fake (reports larger capacity than it has) — test it
Diagnosing "Boots Sometimes"
"Boots sometimes" is the most common and most misdiagnosed SBC problem. People spend hours tweaking kernel parameters and fstab when the answer is almost always one of:
- Bad SD card — cells are starting to fail, causing random read errors
- Bad flash — incomplete write, no
syncbefore ejecting - Fake card — appears to be 32 GB but only has 4 GB of real NAND
- Marginal power supply — card reads fine when voltage is stable, fails when it dips
- Card reader compatibility — some USB readers corrupt the last sectors of large cards
Testing SD Cards for Defects
Linux: f3 (Fight Flash Fraud)
# Install f3
sudo apt install f3
# Write test data to the full capacity of the card
# (Card must be mounted, e.g., at /media/user/SD)
f3write /media/user/SD/
# Read it back and verify
f3read /media/user/SD/
# Results will show actual usable capacity
# If "Data LOST" appears — the card is fake or defective
Windows: H2testw
- Download H2testw
- Select the SD card drive letter
- Click "Write + Verify"
- Wait — this tests the entire card capacity and takes a long time for large cards
- Look for errors. Any errors mean the card should not be trusted.
Quick check: f3probe (faster, destructive)
# f3probe directly probes the raw device — much faster but destructive
# DO NOT run on a card with data you need
sudo f3probe --destructive --time-ops /dev/sdX
f3probe --destructive and f3write/f3read will erase all data on the card. Only run these on cards you're about to re-flash anyway.
Decision Tree: "It Boots Sometimes"
Work through this in order:
- Did you verify the download checksum?
- No → Re-download and verify. Start over.
- Yes → Continue.
- Did you verify the flash (Etcher verify pass, or read-back hash)?
- No → Re-flash with verification. Use
conv=fsyncandsync. - Yes → Continue.
- No → Re-flash with verification. Use
- Try a different SD card (known good, endurance rated).
- Different card boots reliably → Original card is defective. Replace it.
- Same problem on different card → Continue.
- Try a different card reader/USB port for flashing.
- New reader works → Old reader is unreliable. Discard it.
- Same problem → Continue.
- Check power supply (measure 5V under load — see the crash diagnosis checklist).
- Voltage drops below 4.75V → Replace power supply.
- Voltage stable → Continue.
- Connect serial console and capture full boot log.
- U-Boot errors → Image or card issue — re-flash.
- Kernel panic → Note the panic message. Check if it's a known issue for your kernel version.
- No output at all → Board may be dead. Try a different board if available.
Prevention Checklist
Run through this every time you flash a new image:
- ☐ Downloaded image from official source (not a random mirror or forum link)
- ☐ Verified SHA-256 checksum matches published value
- ☐ Verified GPG signature (if available)
- ☐ SD card is endurance-rated (Samsung PRO Endurance, SanDisk MAX ENDURANCE)
- ☐ SD card has been tested with f3/H2testw at least once
- ☐ Flash tool performed read-back verification (Etcher auto-verify, or manual dd + hash)
- ☐ Waited for
syncto complete before ejecting the card - ☐ Power supply provides stable 5V/2A+ under load
- ☐ First boot allowed 60-90 seconds for partition resize
- ☐ Serial console connected (if available) for boot diagnostics