Very OT - recovering data from a Compact Flash card

Hi,
Googling etc. as usual but I thought perhaps someone on this NG had already "done it themself".
I have a digital camrea with compact flash cards.
Normally I read these using a PCMCIA adapter for the portable or a Lexar Jumpshot USB adapter for the bigger boxes.
One card failed to work in the camera.
I checked it using the Lexar and the card seems to be corrupt, but there is still data on there - about 2Mb on a 16Mb card.
'chkdsk' under Win2K and WinXP can't fix it.
'fsck' under Debian Linux (Knoppix 3.4) can't fix it either.
Anyone know of a good (free if possible) disc fixer which might be able to recover the data?
Scrabbling desperately to stay within the NG remit, I suppose I could send it off to a data recovery outfit but I would prefer to Do It Myself :-)
TIA
Dave R
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
In an earlier contribution to this discussion,

You may have already answered this - but just to make sure . . .
Can you see any pictures on it when you put it in the camera - even if you can't store any further pictures on it? If not, it's probably completely b*****ed - and won't do anything until re-formatted, which will - of couse - result in the loss of any data on it.
If the camera *can* see the data, do you have a method of connecting the camera to one of your computers, to download it that way?
--
Cheers,
Set Square
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
<snip>

<snip>
Unfortunately the way I found out it was buggered was when I put it in the camera and saw nothing.
Checked it on the PC to confirm, and now trying to fix :-(
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

DO NOT use any software that does not specifically state that it can be used without writing to the device in question. Otherwise, you may corrupt it further. Are the pictures of much financial value, or just annoying to lose?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

you
the
I don't even know if I have used the card since the last backup - been getting a bit sloppy with my housekeeping.
Annoying to lose if there are any not saved, but this is now an interesting exercise to prepare for a future problem (should it ever occur).
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
In an earlier contribution to this discussion,

I have had similar problems with SmartMedia cards in my Fuji camera. It has always been the case that if an external device *writes* to a card, the camera has problems with the card until it has re-formatted it itself. More recently, I have had occasional problems where the camera has been unable to write to a card after I have deleted selected images without doing a re-format.
As a precaution, I have now adopted the following procedure: Format a card in the camera Take photos as required *Don't* delete any images - even if they are crap When the card is full, transfer the images to a computer using an external card reader, and delete any unwanted ones on the computer Re-format the card in the camera for future use
The only downside to this is that it reduces the effective card capacity when I know I've got scrap pictures - but I haven't had any media problems since adopting this approach.
--
Cheers,
Set Square
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

rec.photo.digital is probably a good place to ask.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sun, 9 May 2004 16:29:21 +0100, "David W.E. Roberts"

Take a look at www.dfsee.com
IIRC 45 evaluation period.
Regards,
Francis
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

to
Trying this now.
My brain is slowly melting - shows how much I have got used to being 'nannied' by graphical interfaces designed for dumb bunny users.
AFAICS the main problem is that the directory holding the images is being seen as a single file - there is some kind of corruption at the top level, as there should be a 'My Documents' directory (to keep my iPAQ happy), and an IMFIXD10 directory/folder to keep the camera happy.
The card seems to contain one very large file, and another couple of zero length files, all of which have 'garbage' file names.
I am hoping to find a tool that will treat the 'file' as a directory and recover files from it.
So far it looks as though the card is totally screwed, with bad format and bad sectors.
Now wondering how this happened - did I let it too near my mobile phone or something?
Fortunately I have most of the pictures backed up to hard disc - just can't remeber if I used the card since the last backup.
Ho hum.
Thanks for all the suggestions so far. Dave R
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

In my experience most of these systems hold the index in memory, and the data on the disk. Only at intervals do they flush the index changes onto the disk. As each file is very rarely held in one contigious lump, you need the index to find all the bits and put them back together in the right order.
Also I have found most of these system have multiple indexes, so that various activites can be undertaken at speed. The "fixer" programs use the multiple indexes to try and reserect the files.
A directory, is only a special type of file, it is not the index.
I would start by reading the device in "raw" (charcater) mode. If you can read all the 16M they the device itself is not damaged, only the indexes. If this fails, then the device is most likley damaged. Once you have read the device, you can sit with the filesystems source code, and binary dumps of your device and piece it all back together again. This ls a long boring exercise not to be recommended to anyone who is not totally desprate. If you pay someone to fo it expect 500 quid a day+, and a few days/weeks work.
In case you are wondering I re-wrote fsck for both BSD and EFS filesystems.
Rick
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

So what happens if you use a card reader
you only have the card
--
geoff

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
<snip>

** However they do have to flush any memory buffers before the card is removed - this should happen each time you power off the camera, at a minimum. If not, how can you read the card in an external reader? **

** A while since I looked at this, but doesn't a directory/folder hold the details of the file name, attributes, and a pointer to the linked list (or chain or similar) of individual blocks which makes up the body of the file? AFAICS the camera is using FAT as the format to store data to aid compatability with PCs when copying pictures. Granted there may be hidden files which hold 'non-FAT' fast access data, or possibly another partition on the disc for the camera-specific data, however the FAT partition seems to be well thrashed. Difficult to draw a comparison with a real disc as there are no moving parts and therefore there must be something there which provides a virtual mapping from direct memory address to to head and cylinder. Quite possibly this is damaged. **

Using DFSee (as recommended elsewhere) to scan the disc I get: [This is just the end of the report]
" Continue scanning : 00003AD2 Bad spot found at : 00003B10 63 sectors SectorRead RC: 1 Cyl: 0 H:240 S:
Continue scanning : 00003B11 Bad spot found at : 00003B4F 63 sectors SectorRead RC: 1 Cyl: 0 H:241 S:
Continue scanning : 00003B50 Bad spot found at : 00003B8E 63 sectors SectorRead RC: 1 Cyl: 0 H:242 S:
Continue scanning : 00003B8F Bad spot found at : 00003BCD 63 sectors SectorRead RC: 1 Cyl: 0 H:243 S:
Continue scanning : 00003BCE Bad spot found at : 00003C0C 63 sectors SectorRead RC: 1 Cyl: 0 H:244 S:
Continue scanning : 00003C0D Bad spot found at : 00003C4B 63 sectors SectorRead RC: 1 Cyl: 0 H:245 S:
Continue scanning : 00003C4C Bad spot found at : 00003C8A 63 sectors SectorRead RC: 1 Cyl: 0 H:246 S:
Continue scanning : 00003C8B Bad spot found at : 00003CC9 63 sectors SectorRead RC: 1 Cyl: 0 H:247 S:
Continue scanning : 00003CCA Bad spot found at : 00003D08 63 sectors SectorRead RC: 1 Cyl: 0 H:248 S:
Continue scanning : 00003D09 Bad spot found at : 00003D47 63 sectors SectorRead RC: 1 Cyl: 0 H:249 S:
Continue scanning : 00003D48 Bad spot found at : 00003D86 63 sectors SectorRead RC: 1 Cyl: 0 H:250 S:
Continue scanning : 00003D87 Bad spot found at : 00003DC5 63 sectors SectorRead RC: 1 Cyl: 0 H:251 S:
Continue scanning : 00003DC6 Bad spot found at : 00003E04 63 sectors SectorRead RC: 1 Cyl: 0 H:252 S:
Continue scanning : 00003E05 Bad spot found at : 00003E43 63 sectors SectorRead RC: 1 Cyl: 0 H:253 S:
Continue scanning : 00003E44 Bad spot found at : 00003E82 63 sectors SectorRead RC: 1 Cyl: 0 H:254 S:
Continue scanning : 00003E83
Elapsed time is : 2851 seconds, throughput 2.81 KiB/sec 16002 Bad sectors found! You can use the 'list' command to show, or the 'export' command to save the list to a file. When a buffersize larger than 1 has been used (default), you can use the '-b:1' option on 'scan' to get maximum precision and minimum number of bad sectors
"
My tentative conclusion is that the card is totally banjaxed and requires a reformat at minimum.
My other query is:
If there is already a driver mapping the card via the card reader to present it to the O/S as a disc, will this get in the way of reading and possibly fixing the raw format of the device? Presumably the correct way to get at the basic structure of these memory cards is to have a card reader with a raw device driver which goes directly into your program. So effectively you are looking at a piece of RAM and not a pseudo-disc. I guess you can do this with Unix/Linux but can you do this with recent versions of Windows?
Cheers
Dave R
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 10 May 2004 08:57:05 +0100, "David W.E. Roberts"

In the good old days, you had cylinders heads sectors etc, and you cound precisely control where data ended up on the disk. Nowdays a disk is just hugle long streem of sectors, and the disk controller fales up the cylinders/heads sectors counts. You can alter these figures to a very large degree, and the things still work.

I would conclude the same. At this point I would give up on my data. The physical medium would appear to be damaged in some way.

Now we have establised most disks fake up the cyl/hds/sec figures and are just lot of sectors, maped onto the physical medium by the disk controller, you now know thats what the memory card is doing.

Unix yes - windoze - no idea.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Meanwhile, back to memory cards ...
--
geoff

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sun, 9 May 2004 18:20:28 +0100, "David W.E. Roberts"

Not sure if this is relevant but I had some SmartMedia crash, lockup, report the wrong size etc.
I found there was a util often provided with the media reader that will do a low level format on the card and in my case, recovered 2 SM cards (lost all data though).
For my Sandisk USB SM reader the util was called "SMPREP.EXE" and was found in the application folder.
Apparently it should be used with a specific device (ie Sandisk reader in my case).
All the best ..
T i m
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
David W.E. Roberts wrote:

I had success with http://www.datarescue.com/photorescue /
You can try it free, to see if anything is recoverable; you only need to pay if it is going to work.
Chris
--
Chris J Dixon Nottingham UK
snipped-for-privacy@cdixon.me.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sun, 9 May 2004 16:29:21 +0100, "David W.E. Roberts"

This tryout might get you out a hole . Stuart http://www.pcinspector.de/smart_media_recovery/uk/demo.html
--

"YESTERDAY is history,TOMORROW is a mystery,TODAY is a gift

That is why it is called the present "
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

already
is
to
send
Another to try http://freedownloadswindows.com/windows/6513757/Recover-My-Photos.html
Good Luck
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.