LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 01-01-2010, 06:49 PM   #1
djcs
Member
 
Registered: Jun 2006
Posts: 43

Rep: Reputation: 15
Question Broken sd card


Hi all,
Seriously in need of some help here.
I am trying to recover some photos from my 8GB flash card that decided to crap out.
I keep getting SDA read capacity failed.

Is there a way i can force the kernel into saying that the read capacity is 8GB so i can run ddrescue or something over it to recover the data?

Any help, ideas or directions would be helpful.

DJ
 
Old 01-02-2010, 02:20 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Probably not.

When you plug it in, you get some messages in syslog. What are they?
 
Old 01-04-2010, 11:20 PM   #3
cgtueno
Member
 
Registered: Jul 2003
Posts: 356
Blog Entries: 1

Rep: Reputation: 49
Hi

If you have access to an MS XP machine, try:

http://www.pcinspector.de/smart_medi...uk/welcome.htm

Hope that helps

Chris
 
Old 01-04-2010, 11:53 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Please be more exact on what the error message is, and post the lines in /var/log/messages for this device just after you plug it in.

If the device can be read but the filesystem is corrupt, you will be able to read from the raw device and make an image copy. It will be safer trying to recover files, or make repairs to a copy of an image file. That way, if your efforts make matters worse, you can start over.
 
Old 01-05-2010, 06:52 AM   #5
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Sometimes usb drives also report their size way too smaller from their actual size. It's in /var/log/messages. When it happened to my drive, there was nothing I could do. Luckily though, the device worked properly again.

Maybe modifying (cheating) the kernel is the only trick?
 
Old 01-06-2010, 01:39 AM   #6
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by cgtueno View Post
Hi

If you have access to an MS XP machine, try:

http://www.pcinspector.de/smart_medi...uk/welcome.htm

Hope that helps

Chris
I think you mean PCInspector Smart Recovery - this is a proprietary file un-delete program for Windows which exploits the well-known fact that deleting a file just removes its pointer not the file itself.

There is no need to resort to Windows for this - we can do fat16 file recovery from within gnu/linux happily using the same methods.

The simplest approach is to grep through the block special device.

There are automated approaches for many file systems, but I suspect magic rescue will be the one to try here.

As free software it is available in most distros repositories.

Thing is, we really need to know what is going on before suggesting a solution.

Last edited by Simon Bridge; 01-06-2010 at 01:40 AM.
 
Old 01-06-2010, 12:53 PM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Or just run 'dmesg' about 10 seconds after plugging it in and post that. If it shows up, I would try to use dd to get a image of it to the HDD ASAP. If it doesn't show up, then that's about it.
 
Old 01-06-2010, 11:10 PM   #8
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
@djcs: how did you get on?
 
Old 01-12-2010, 08:15 AM   #9
cgtueno
Member
 
Registered: Jul 2003
Posts: 356
Blog Entries: 1

Rep: Reputation: 49
@ Simon Bridge

Hi

Yep that's the one.
Sorry the link was fouled up in my post.

I personally have found it a very useful tool to recover missing and damaged images.
You can download a copy for evaluation purposes and it is very simple to use.

I was interested to hear that you think it is simply a FAT undelete program, I'm sure that I used it to recover image files from physically damaged memory cards. I'm happy to be corrected if I am wrong.

And yes you are correct there are many tools in the Distros for attempting data recovery from storage devices at a binary level provided the storage device's hardware mechanism works.

Can't see any problem with using a recovery too before detailed analysis in this case. It would simply be hit and miss with little risk of further significant data corruption on the device.

Often the most direct an simple approach works - lol

C.
 
Old 01-12-2010, 08:33 AM   #10
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Well, the main problem here is that once a USB stick (or other flash media) craps out, usually you can't even read from it much less carve data from it. I would make an image ASAP if you suspect it's dieing. That's why you never backup to flash media.
 
Old 01-17-2010, 06:53 AM   #11
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by cgtueno View Post
@ Simon Bridge

Hi

Yep that's the one.
Sorry the link was fouled up in my post.
No worries.

Quote:
I personally have found it a very useful tool to recover missing and damaged images.
You can download a copy for evaluation purposes and it is very simple to use.
But still proprietary. Where you have a choice between a proprietary and non proprietary program, it is good thinking to pick the non-proprietary one.

Quote:
I was interested to hear that you think it is simply a FAT undelete program, I'm sure that I used it to recover image files from physically damaged memory cards. I'm happy to be corrected if I am wrong.
I do not think that it is "simply a FAT undelete program. Never did. I said it was a "proprietary file undelete" program. The bit about how it works is lifted from the vendors web site.

Quote:
Can't see any problem with using a recovery too before detailed analysis in this case. It would simply be hit and miss with little risk of further significant data corruption on the device.
Each read of a device which you suspect to be failing risks further damage to the medium. This is partly why it is best practise to image a failing drive and then use data forensics on the image.

The gui undelete tools are really intended for use in the case of accidental erasure rather than data forensics on a damaged drive.

The most direct approach is to use dd to image the drive, then grep through the image for file headers, magic numbers and such like. Many of the free-software recovery programs automate this process. If there is no /dev entry though, then we are looking at electronics - probably more trouble than OP wants to deal with.

Still need feedback from OP.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with a very small and cheap USB sound card (kernel driver is broken) mek Linux - Hardware 4 10-23-2009 06:30 PM
Broken Executable Files for Mplayer and Nvidia card cbjhawks Suse/Novell 3 06-28-2007 11:40 PM
broken sound card in a sony vaio pcg-frv25 hybridion Linux - Laptop and Netbook 1 05-12-2005 08:38 AM
Ethernet card "broken" after Knoppix LiveCD?? lutha Linux - Networking 11 01-05-2005 03:20 AM
Sound Card or AC97 Codec Broken al_erola Linux - Hardware 2 07-23-2003 08:20 AM


All times are GMT -5. The time now is 04:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration