0

I have lots of IoT devices running linux off an SD card, and for some reason they've all recently stopped working!

To get to the bottom of the issue, I tested these SD cards in Windows laptop.

The laptop could not read the SD cards, meaning:

  • Disk Management hung indefinitely
  • DISKPART hung when I tried to list
  • the volumes CHKDSK reported the disk as RAW formatted

I thought all hope was lost until I set the SD card to read-only using the little switch on the side of the card.

The laptop was then able to fully read the SD cards, meaning:

  • Disk Management worked ok
  • DISKPART showed the volumes ok
  • CHKDSK reported the disk as FAT formatted (i.e. FAT 16)

So my questions now are:

  • What on earth is going on here and why?!
  • How do I recover these SD cards, since reformatting them fails in read only mode and read/write mode hangs everything.
  • Are there tools that can help with this?

Thanks in advance!

Timbo
  • 101

1 Answers1

1

Sadly this is a common issue with some SD cards and has been answered on this website before:

Flash Storage failure

When a SD card encounters an issue, it will lock the data to prevent data loss. If there is no way to lock the data, it will prevent access until it is physically locked. Basically, your SD card has:

1) Reached the end of its lifespan or was a defective batch. If they are all the same brand and model, this is a big possibility.

2) Something in Linux is breaking the SD cards. This is rare and usually only happens if formatting goes wrong. If Linux recently went through an update on your IoT platforms, this is possible.

3) A power failure or instability is reducing the life of the SD cards? Superuser article on Flash instability Has there been any power cuts lately or instabilities?

To prove if it is Linux, I would try a new brand of SD card and try to reproduce the same conditions before the SD cards failed.

It is possible to recover these SD cards to a functional state. There is multiple articles on this issue: Superuser article on this subject

The issue is with time lost and complexity. I highly suggest not re-using SD cards that suffered such a failure.

Natsu Kage
  • 1,002