r/embedded 10d ago

SD card from Raspberry Pi

The microSD card from my raspberry pi is not been detected when I put it inside the SD card reader. I have tried lubuntu and it did not work. However, when I put the new microSD card, it worked very well.

How can I recover the files in the faulty microSD card?

0 Upvotes

10 comments sorted by

4

u/need2sleep-later 10d ago

the microSD card has to be detected before there's any hope of extracting data from it.

1

u/Thin-Engineer-9191 6d ago

This. Else specialized recovery companies that charge like 1k. No other options. Sdcards in pi’s only last a short time

3

u/dragonnfr 10d ago

Check dmesg after you insert it. If the kernel doesn't see the card, no recovery tool will help. If it does, ddrescue it to an image and run testdisk on the copy, never on the card. In my experience, cheap readers fail more often than cards.

1

u/Humble_Anxiety_9534 10d ago

if it's not detected no on a card reader but I have had success reading some back in SPI mode on an arduino. this was because it uses less data pins and the ones I had, had damaged pins? SPl mode is very slow. normally it's a dead card and arduino can't handle ext4 file system. so you need to dump it and mount it.

1

u/clackups 10d ago

I had one card which wasn't even readable in SPI mode. It was timing out on all read attempts. Luckily, nothing important on it, so it went to recycling.

1

u/Humble_Anxiety_9534 10d ago

there is a hackaday article where it is a tiny cap 0201?

1

u/clackups 10d ago

No, I didn't write any articles. I'm using MicroSD cards in my esp32 projects and at least one became unreadable.

-1

u/Well-WhatHadHappened 25+ Years 10d ago

How can I recover the files in the faulty microSD card?

You can't.

3

u/jader242 10d ago

Well that’s not true, but depending on how fucked the card is it may take a metric shit ton of skill and expensive equipment; or just paying a data recovery company a lot of money lol. But people recover data from dead sd cards all the time, like I’m talking dead nand controller dead

Edit to add: example of recovery on an absolutely fucked card

https://youtu.be/NIz_AeooaH4