Cause 1: An underpowered supply (the most common, and the most missed)
This is the one people rule out first and shouldn't. A Pi that isn't getting enough current doesn't simply switch off — it browns out. Voltage sags below what the board needs, and if that happens mid-write, the card is left in an inconsistent state. Do that enough times and the filesystem gives up.
What makes it sneaky is that the symptoms don't look like a power problem. You get random freezes, apps crashing, USB devices dropping out, and eventually a card that won't boot. It reads like a software fault or a bad card.
What you actually need
- Raspberry Pi 5: the official supply is 27W — 5.1V at 5A over USB-C. It will run on a 3A supply, but with limits on how much current it'll allow to USB peripherals.
- Raspberry Pi 4: 5V at 3A over USB-C.
- Older models: less, but still more than a random phone charger reliably provides.
Raspberry Pi OS will tell you if it's unhappy: you'll see a lightning bolt icon in the corner of the screen, or undervoltage entries in the system log. Check with:
vcgencmd get_throttled
A result of throttled=0x0 means no problems detected. Anything else means the Pi has recorded an undervoltage or throttling event — and you've found your culprit.
Cause 2: Pulling the plug instead of shutting down
A Pi is a full computer running Linux, and it buffers writes in memory before committing them to the card. Cutting power skips that final write. You'll get away with it most of the time — which is exactly why the habit forms — but every hard power-off is a roll of the dice.
Always run:
sudo shutdown -h now
and wait until the green activity LED stops flickering before removing power.
If your Pi lives somewhere awkward to reach, wire a physical shutdown button to a GPIO pin and a small script — it turns a two-step process into one press, which is usually enough to make the good habit stick. (PinTinker will find you a free pin for it.)
Cause 3: Cheap or counterfeit cards
Fake SD cards are genuinely common in online marketplaces — cards that report a large capacity to the operating system but contain far less real storage. They appear to work fine until you write past the real capacity, at which point data silently disappears and the filesystem breaks.
Two practical defences:
- Buy from a reputable retailer rather than the cheapest marketplace listing. A genuine card from a known brand costs a few dollars more and saves entire evenings.
- Verify a new card before you trust it. Tools like
f3on Linux or H2testw on Windows write and read back the full capacity to confirm it's real.
Look for cards rated A1 or A2 — that rating specifically covers random read/write performance, which is what an operating system does constantly, as opposed to the sequential speed a camera cares about.
Cause 4: Write wear from constant logging
Flash memory cells wear out after a finite number of writes. For ordinary desktop use this is rarely the limiting factor — but a Pi running a project that writes continuously (a sensor logging every second, a security camera, a busy database) can chew through a card's life in months rather than years.
If that's your use case:
- Log to RAM and write to the card periodically in batches, rather than on every reading.
- Send the data somewhere else entirely — a network share, a database on another machine, or a cloud service.
- Move the whole operating system to a USB SSD. Pi 4 and Pi 5 both boot from USB, and an SSD is dramatically more durable than an SD card. For any Pi that runs continuously, this is the single best upgrade you can make.
The one habit that makes all of this survivable
Once you have a Pi configured the way you want it, take an image of the card and keep it somewhere safe. The Raspberry Pi Imager tool, Win32 Disk Imager, or dd on Linux and macOS will all do it.
Corruption then stops being a lost weekend of reconfiguring and becomes a ten-minute reflash. It's the difference between an annoyance and a disaster, and it costs you one evening to set up.
Gear that helps
An official Raspberry Pi power supply eliminates the single most common cause on this list, and costs less than the time you'll spend diagnosing it. A good-quality A2-rated microSD card from a reputable brand handles causes 3 and 4, and a USB SSD enclosure is worth it for any Pi that runs 24/7.