Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#308986 - 09/04/2008 20:06 Recover data from USB media?
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
I had one of my camera's Smart Media cards die on me the other day,
and I'm trying to recover the photos that I took that day.

Windows XP doesn't mount the card via a USB card reader. Mac OS X
doesn't mount the card via a USB card reader, either. Since I can't
get the card to mount, it doesn't even show up as a device in /dev,
which prevents me from doing a "dd" to recover data.

The camera doesn't even recognize the card now, and refuses to
even format the card.

Googling hasn't been of much help, but I did find a couple of
utilities that I'll try once I get home:

http://www.cgsecurity.org/wiki/TestDisk
http://www.cgsecurity.org/wiki/PhotoRec

However, it looks like they require the media to be mounted,
leading me to believe that they aren't going to be useful.

So... any suggestions on how to get the card visible under Linux?

Top
#308987 - 09/04/2008 20:38 Re: Recover data from USB media? [Re: canuckInOR]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
As long as it sees the card at all, it will create a device node which you can dd from. If the card is so damaged that it no longer actually appears to be a flash card at all, you may be out of luck.

Edit: I expect that this is the case with MacOSX, too, but I don't know that for sure and I don't know where that device node might show up. You might check dmesg after you insert it to see if it says anything


Edited by wfaulk (09/04/2008 20:39)
_________________________
Bitt Faulk

Top
#308988 - 09/04/2008 21:51 Re: Recover data from USB media? [Re: canuckInOR]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Originally Posted By: canuckInOR
I had one of my camera's Smart Media cards die on me the other day,
and I'm trying to recover the photos that I took that day.

Windows XP doesn't mount the card via a USB card reader. Mac OS X
doesn't mount the card via a USB card reader, either. Since I can't
get the card to mount, it doesn't even show up as a device in /dev,
which prevents me from doing a "dd" to recover data.

The camera doesn't even recognize the card now, and refuses to
even format the card.

Googling hasn't been of much help, but I did find a couple of
utilities that I'll try once I get home:

http://www.cgsecurity.org/wiki/TestDisk
http://www.cgsecurity.org/wiki/PhotoRec

However, it looks like they require the media to be mounted,
leading me to believe that they aren't going to be useful.

So... any suggestions on how to get the card visible under Linux?


If you want, you could mail the card to me here,
and I'll recover anything that can be recovered from it.

And.. I'll even post the juiciest photos onto a public webserver for you. smile

Top
#308989 - 09/04/2008 22:36 Re: Recover data from USB media? [Re: wfaulk]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: wfaulk
As long as it sees the card at all, it will create a device node which you can dd from.

Right now, I think it's not even seeing the card -- at least on XP and OS X. I haven't had the chance to try it under linux, yet, but I'm expecting it to be the same behaviour. I tested a good card, and it created a device node under /dev (sda1, I think), but wouldn't create anything for the bad card.

Top
#308990 - 10/04/2008 00:19 Re: Recover data from USB media? [Re: canuckInOR]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Smart Media cards are simple. They're just a plastic carrier for a NAND Flash chip and thats pretty much it. There isn't a controller or anything at all like the newer cards will have.

As a last resort you can dump out the raw contents of the card using an adapter and a EEPROM reader device of some sort. How valuable are the photos on the card? What did you do to the card in the first place to kill it that badly...

Top
#308991 - 10/04/2008 00:22 Re: Recover data from USB media? [Re: mlord]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: mlord
If you want, you could mail the card to me here,
and I'll recover anything that can be recovered from it.

That would be much appreciated. I'll PM you for your address, if I have no luck in the next few days.

Quote:
And.. I'll even post the juiciest photos onto a public webserver for you. smile

Well, I'd hate to disappoint you, but there isn't anything juicy on the card. Some photos of relatives in Blackpool and Stafford, who I'd never met before -- that's about it. (I figure it's bad juju for taking a trip to England that didn't coincide with the empeg meet. crazy)

But that does remind me of the time I played badminton with a friend of mine from work, who'd recently gone on a vacation to China with his girlfriend. He brought his camera to take pictures of us playing, and while waiting for my turn to play (we had an odd number of players), I flipped through the vacation photos on the camera. After I was done, I just looked up at him, and yelled "woah, are these supposed to be on here, still?" Man... his face turned beet red. He rushed over, grabbed the camera away, and frantically started going through the pictures, to no avail. Meanwhile, his girlfriend just stood there, rolling her eyes -- she'd gone through and cleaned out the incriminating photos long beforehand.

I think he's still pissed at me.

Top
#308992 - 10/04/2008 00:30 Re: Recover data from USB media? [Re: tman]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: tman
How valuable are the photos on the card?

Well, it was my first trip to England, and the first time I've met those particular relatives, and even my Aunt hasn't seen them in about 15 years. Vacation photos, they may be, but I'd like them back, as I have no other copies.[/quote]

Quote:
What did you do to the card in the first place to kill it that badly...

I have absolutely no idea. I took photos on the card, and when the card was full, swapped it out for the next card, and put the full card in the little plastic carrying case. A couple days later, and a couple train-rides later, I went to download the photos, and... nada. The only thing I did that was remotely unusual that I can think of, is that I went into a Sainsbury's supermarket and walked past the shoplifter sensor thingy by the door. Mind you, I entered other stores with them -- both before using the card, and after it died -- and never had any ill effects.

Top
#309010 - 10/04/2008 12:29 Re: Recover data from USB media? [Re: canuckInOR]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
I recently did something like this for someone. I used a program called ZAR (Zero Assumption Recovery). It's a for-pay program, but there are no limitations on the flash media recovery mode. But as you've observed previously, the drive may need to be mounted first. Have you tried a different reader?
_________________________
Matt

Top
#309023 - 10/04/2008 14:25 Re: Recover data from USB media? [Re: Dignan]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: Dignan
Have you tried a different reader?
No -- I don't have another one I can try. But since other cards do work in the reader, and this one used to work in it, and now doesn't work in either it, or the camera itself, I'm inclined to believe that a new reader won't fix the problem. I'll take a look at ZAR -- maybe I can run it under wine, since I no longer have access to a windows machine.

Top
#309040 - 10/04/2008 20:06 Re: Recover data from USB media? [Re: canuckInOR]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: canuckInOR
Originally Posted By: wfaulk
As long as it sees the card at all, it will create a device node which you can dd from.

Right now, I think it's not even seeing the card -- at least on XP and OS X. I haven't had the chance to try it under linux, yet, but I'm expecting it to be the same behaviour. I tested a good card, and it created a device node under /dev (sda1, I think), but wouldn't create anything for the bad card.
Now that I've tested under Linux, to be more precise, when I plug in the card reader, it creates 4 device nodes, /dev/sd[b-e] (it's a multi-card reader). When I insert a good card, an additional device node, /dev/sdc1, is created. Inserting the bad card does nothing. The little blinky transfer light on the card reader doesn't even flash, the way it does for the good card.

Attempting to open the /dev/sdc device directly (in python, os.open("/dev/sdc", os.O_RDONLY)) spits back a "No medium found: '/dev/sdc'" error when the bad card is inserted, but is successful when the good card is inserted.

Nothing shows up in /var/log/messages when I insert the bad card. Inserting a good card generates the following:
Code:
    Apr 10 14:55:17 congo kernel: SCSI device sdc: 64000 512-byte hdwr sectors (33 MB)
    Apr 10 14:55:17 congo kernel: sdc: Write Protect is off
    Apr 10 14:55:17 congo kernel: sdc: assuming drive cache: write through
    Apr 10 14:55:17 congo kernel: SCSI device sdc: 64000 512-byte hdwr sectors (33 MB)
    Apr 10 14:55:17 congo kernel: sdc: Write Protect is off
    Apr 10 14:55:17 congo kernel: sdc: assuming drive cache: write through
    Apr 10 14:55:17 congo kernel:  sdc: sdc1

At this point, unless anyone else has a suggestion, this card is definitely broken beyond my capabilities to repair.

Top
#309379 - 24/04/2008 04:47 Re: Recover data from USB media? [Re: canuckInOR]
altman
carpal tunnel

Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
As has been noted, smartmedia is just plain NAND; any card reader is likely to have trouble mounting it as it will be attempting to read the low-level format so it can present a logical block-style device.

Really the only thing you can do is to pull the raw data off with some sort of device programmer. On the upside, being old, smartmedia cards are SLC NAND and you'll probably get most of the sectors off without needing to bother with the ECC data. On the downside, without lots of understanding of the format and how remapping might be working, you'll just have a load of 512 byte sectors which may not be very easy to group into actual JPEGs.

Maybe these guys are worth trying?

http://www.smartmediarepair.com/html/image_recovery.html

$20 seems pretty cheap if they can do the job...

Hugo

Top
#309391 - 24/04/2008 14:14 Re: Recover data from USB media? [Re: altman]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: altman
As has been noted, smartmedia is just plain NAND; any card reader is likely to have trouble mounting it as it will be attempting to read the low-level format so it can present a logical block-style device.
Hmm... is that a function of the card reader itself, or the device driver for the card reader?
(Not that I'm quite geeky enough to write a new device driver...)

Quote:
Really the only thing you can do is to pull the raw data off with some sort of device programmer.
Yeah, I figured that's what Mark was going to attempt.

Quote:


Thanks for the link, Hugo -- $20 does seem reasonable.

Cheers,

Top