1

For some weird reason, updating Raspberry Pi OS keeps breaking my system. For the second time since setting up my Raspberry Pi 4 (8GB RAM), my microSD card has been corrupted and cannot run the OS. When this happened last time, I was able to format the SD card and reinstall the OS. However, the same thing has happened again today. Both times, this issue came up after installing updates to Pi OS and shutting down the system. Has this happened to anyone else? If yes, how did you fix the problem? Is the only solution simply to stop updating Pi OS until the issue gets resolved?

shwin320
  • 11
  • 1
  • 4
  • 1
    How old is the microSD card that is affected? May be it is more a hardware problem of the SD card which occurs after writing a certain amount of data? – Robert Jun 21 '21 at 18:43
  • @Robert It's an old, 16GB microSD card I had lying around. Would a newer SD card be able to run with no problems updating? – shwin320 Jun 21 '21 at 18:57
  • Would be worth a try. Unless you shut down Pi by removing power without shut down before, file-system defects should not occur no matter how wrong an update gets. – Robert Jun 21 '21 at 19:15

1 Answers1

1

"Updating" is not breaking your system. Your comment, It's an old, 16GB microSD card I had lying around reveals the most likely source of your problem. It's well-known and extensively documented that there is a wearout mechanism associated with SD media. Wear leveling is a technique to mitigate wearout, but it is not uniformly implemented.

Consequently, all SD cards should be considered perishable - and some perish more quickly than others. This is likely due to the fact that wear leveling is not required by the SD Association - at least not for all device classes - instead this is left as a marketing decision for each individual manufacturer.

I'm always reluctant to plug a specific manufacturer, but I will say that in my personal experience I cannot recall a single failure of a SanDisk brand flash memory card. I am sure there are other reliable brands, but I cannot name them.

If you're committed to using your present card, you may find this memory card formatter from the SD card association useful - here's a link to download it. You may also consider running fsck in an effort to diagnose & repair your existing SD card. Here's a detailed procedure for running fsck - you can even run this procedure on your Raspberry Pi after you've installed a reliable SD card :)

Seamus
  • 18,728
  • 2
  • 27
  • 57