Hey guys I'm facing a super strange problem that's been blocking me for days now. I have a RPi zero w and I can successfully flash the latest Raspbian Lite image onto the SD card and boot it up, but after the first shutdown, the rootfs gets corrupted/broken somehow and I can't boot anymore and I can't even access the partition from my computer either. Here are the steps that I'm doing:

  1. Use Raspberry Pi imager tool to flash latest Raspbian Lite to SD card
  2. Move SD card to RPi
  3. Power on
  4. Watch it automatically resize the image and reboot
  5. I can login and everything is working. I can reboot as many times as I want
  6. I run "sudo shutdown -h now" then after it shuts off I unplug it
  7. Plug the power back in to boot it up
  8. Boot fails. stuck on line "random: crng init done". At this point I can't boot anymore and I can't even read this partition from my computer anymore either, it says "bad file system, etc"

I can repeat this process as many times as I want. Re-imaging the SD card makes it work, but then after first shut down it breaks again. What am I doing wrong????

  • Have you tried a different SD card?
    – user130616
    Apr 20 '21 at 1:06
  • @Andrew I haven't actually. Somehow I'm not suspecting a hardware failure since I can boot the system perfectly with full functionality every time I do a fresh re-imaging. Surely a hardware problem wouldn't behave like that, right?
    – Dre
    Apr 20 '21 at 1:10
  • if the SD card has issues, then the issues may not be apparent until after first boot, when the filesystem is expanded to use the whole disk - could be a "fake" sd card ... did you buy a known brand SD card from a reputable source? Apr 20 '21 at 1:18
  • Simplest test I can think of is to download a lite copy (check SHA) and image with Etcher. Boot, expand disk, reboot, shutdown and see if its duff. But TBH I would think SD card error hence another card suggestion. Way too many fake cards - even get them from major retailers now and then.
    – user130616
    Apr 20 '21 at 1:33

This has all the symptoms of a faulty SD Card (assuming it isn't counterfeit).

If you use the SD Association formatter you may be able to use the card (I have had some success this way) but ultimately problems will recur because the underlying NAND is failing.

  • Yes you were right. I bought new SD cards and it seems to be working just fine now. Thanks for the tip!
    – Dre
    Apr 25 '21 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.