cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

raspi and sd card recovery

Sat Jun 21, 2014 8:38 pm

Hi to all.

did anyone tried to connect sd card to spi port? i need to try to recover files from half dead sd card. there is a way to do this with arduino but it is slow since all data goes thru serial port. i have flashed eeprom connected to raspi on spi.

any suggestion on software side. i would like to make an image of sd card sice that is easier to work with then actual sd card

User avatar
DougieLawson
Posts: 35805
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: raspi and sd card recovery

Sat Jun 21, 2014 8:41 pm

I think you're best bet is a hardware solution.
http://www.mymemory.co.uk/Memory-Card-R ... ard-Reader
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Sat Jun 21, 2014 9:29 pm

i have 4 or 5 card readers but non of them can access sd card correctly.

look at http://tech.tiefpunkt.com/2013/08/sd-ca ... n-arduino/

this is almost the same problem with my sd card. i can access sd card from arduino (file system is bad) using spi type connection.

if i try to use card reader whole os (windows) hangs and stops. I need to make image of sd card so that i can use software for data recovery to recover some of files. sd card is from my wife's phone and pictures are what i'm interested in.

User avatar
DougieLawson
Posts: 35805
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: raspi and sd card recovery

Sat Jun 21, 2014 9:35 pm

Use the USB card reader in your RPi (booted from a good SDCard).

Windows can't ever read a RPi Linux SDCard because Windows a) doesn't understand SDCards with multiple partitions and b) can't read ext4 formatted filesystems (without paid for additional software).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: raspi and sd card recovery

Sun Jun 22, 2014 9:51 am

Hi

Windows XP can view limited amount of stuff, DiskInternals claim recovery.

I would actually use linux, OPENSUSE is my preference.
sdcard view.PNG
sdcard view.PNG (61.65 KiB) Viewed 8805 times

User avatar
paulcaseyjr
Posts: 28
Joined: Wed Jun 04, 2014 1:23 pm
Location: New Hampshire
Contact: Website

Re: raspi and sd card recovery

Sun Jun 22, 2014 11:10 am

Assuming the card isn't physically damaged, Paragon extfs free program for Windows will let you view/update the whole file system

cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Sun Jun 22, 2014 3:47 pm

to all

as i have pointed in beginning if i try to connect sd card to pc windows stops responding. whole system just stops until i remove sd card. Right now i can access sd card using arduino but file system is busted. I wish to make a full raw data copy of sd card( byte by byte) and then use recovery software on that image. Usually when file system is bad there is chance of recovering at least some of files using advanced software, I know since I have done it on several hdd.

Right now I'm looking for solution to copy all data from sdcard using raspi. There is solution using arduino but it is basic and not fully functional (look at link that I have poster before).

drgeoff
Posts: 9744
Joined: Wed Jan 25, 2012 6:39 pm

Re: raspi and sd card recovery

Sun Jun 22, 2014 6:23 pm

cetverooki wrote:. sd card is from my wife's phone and pictures are what i'm interested in.
So the SD card doesn't have a RPi file system on it. What OS does the phone use? iOS, Android, other?

cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Mon Jun 23, 2014 1:35 pm

Android is os.

Problem is that there is no file system on sd card. Even when on rare occasion sd card does work it can not be formatted.

What i wanted is to use spi port that card is still accepting to copy byte by byte of it. I don't care if data is unreadable i can sift thru using different software which might fully or partially recover files. I'm interested in pictures that my wife has made. Those are last pictures of her mother and she is missing them. If it was not for that reason I wold not even bother too look for solution.

I know that there are companies for this type of problem. Since I'm on tight budget i can not afford them, and to ad that closest that might do something is 500km from me in different country.

drgeoff
Posts: 9744
Joined: Wed Jan 25, 2012 6:39 pm

Re: raspi and sd card recovery

Mon Jun 23, 2014 2:23 pm

Have you tried any of the Windows programs that are specifically for recovering photos from damaged cards? eg http://www.photosrecovery.com, http://www.z-a-recovery.com/digital-image-recovery.com, http://www.pcinspector.de. Google for more. Some are free, others have limitations until you pay.


The Linux 'dd' command will dumbly do a byte level copy of everything. If you don't have a computer with Linux you can use a Linux live CD. Don't need to install anything to your hard disk.

Edit: Silly me forgetting that your RPi can run Linux! Does your RPi report anything when a card reader with the SD card is plugged in? What does dmesg return after plugging it in?

Wattie
Posts: 51
Joined: Tue Jun 24, 2014 8:05 am

Re: raspi and sd card recovery

Tue Jun 24, 2014 8:14 am

cetverooki wrote:to all

as i have pointed in beginning if i try to connect sd card to pc windows stops responding. whole system just stops until i remove sd card.
This gets me every time I put a card in a windows machine where the card capacity exceeds the card reader's specification. There is no obvious clue that this is happening except for a locked machine.

My quickest solution is to place the card in a USB adapter and then into the same computer. Seems the USB does not have capacity restrictions.

cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Tue Jun 24, 2014 8:25 am

@drgeoff

I did not try to connect usb card reader to raspi. Since card makes windows sluggish and unresponsive I have assumed that it would be the same with linux. Will try that today when I get back home. I was trying to force sd card in SPI mode so that I would bypass all higher level commands and work on basic level. That way even if controller in sd card is bad I can access data.
Do You know if there is software package that will allow me to scan spi bus and display info about devices? Maybe that way i could mount sd card and then use dd for imaging.


cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Thu Jul 03, 2014 6:57 am

@AndrewS

after downloading source for kernel and trying to figure out where and what was changed in mentioned post I can safely say that I'm lost...

My modest knowledge of programming is not enough for figuring out what needs to be changed in source of kernel to make this work.

Now any help would be appreciated, even pointing to what needs to be changed would help. Compiling kernel will not be a problem but reading source code and figuring where change must be made without messing up all the rest is problem.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: raspi and sd card recovery

Thu Jul 03, 2014 11:47 pm

Afraid I don't have the time to help out with kernel patching - maybe somebody else will?

cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Fri Jul 04, 2014 8:19 am

I have tried to contact OP of modification and patch but my private message does not get sent... i will try to contact him in thread if he is still active.

Thx for help. This was more than i thought i will find out.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: raspi and sd card recovery

Mon Jul 07, 2014 1:26 pm

cetverooki wrote:I have tried to contact OP of modification and patch but my private message does not get sent...
Your message gets "sent" when the user you sent the PM to next logs in...

Raspi_developer
Posts: 8
Joined: Sun Aug 10, 2014 5:20 am

Re: raspi and sd card recovery

Mon Aug 11, 2014 10:19 am

@cetverooki

Have you got any success regarding Kernel patch and its use?
I am stuck at this, need help.

cetverooki
Posts: 22
Joined: Tue Mar 11, 2014 9:42 am

Re: raspi and sd card recovery

Wed Aug 13, 2014 5:19 pm

i have tried but had no progress. I guess that i have made some mistake in compiling and moving kernel but I have no way of knowing. Last attempt has left me with messed up os. I had to reinstall from scratch. There is post in other thread that I have made and in it is link to file with all changes that I have made. test it

jackadision
Posts: 1
Joined: Mon Dec 26, 2016 6:17 am

Re: raspi and sd card recovery

Thu Dec 29, 2016 11:33 am

hello Wattie,

You can fix this type of issue, if your memory card is not showing the actual capacity then you need to apply diskpart command in order to fix this issue. You will get the complete guide @ How to Restore a Memory card Capacity Back to Full Size : Using Diskpart?

Return to “Advanced users”