Skip to content

How do I fix a corrupted SD card?

I have a 32 GB microSD card that I know has been corrupted for some time. I used to use it in my Android phone to store music --- nothing critical, but I wanted to try to repair it. When I put the card into an SD adapter and plug the whole thing into my laptop's SD slot, I know the computer detects its presence. Pcmanfm doesn't see it, but I figured that would happen.

Listing /dev after inserting, however, shows a new file/device, /dev/mmcblk0. lsblk also sees the device. I ensured that the SD adapter was unlocked, and tried to mount it. mount appears to hang, and doesn't even respond to CTRl-C, CTRL-D, etc; the only way out is to close the terminal. Ditto for fsck /dev/mmcblk0. I even tried dd if=/dev/zero of=/dev/mmcblk0 bs=512 to zero it out, again to no avail.

I read the troubleshooting section of the "USB storage devices" wiki page, but I'm not having any of those issues. The first issue --- I can see the card in lsblk. The second -- I'm using the LTS kernel, and it's been booted since the last upgrade.

If the card is repairable, how can I fix it? If it's not, it's not a big deal.

Thanks in advance!

5 points4 comments
Open on Reddit
About this post
Posted
Archived
Score
5 · 86% up
Kind
Text
ID
kwredd

Author

8
posts
37
comments
1
media
View profile

4 comments

You can't fix a SD card that started to corrupt data. You might even damage it more by trying to fix it. Like any flash storage, sectors can be written a fixed amount of times, it depends on the actual memory technology. When sectors reach the end on their life, they randomly don't retain information anymore and since there's no SMART like system on SD cards, it can't decide not to use a dead sector or reallocate it. That's why SD cards are pretty bad to store sensible data. SD cards are quite cheap storage and expandable, so no big deal.

4 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.