View Single Post
  #9   Report Post  
Andy Baxter
 
Posts: n/a
Default How to tell if CF card is faulty?

John Stumbles said:

[crossposted to comp.os.linux.misc as well as *.photo.* groups because I
know there'll be people there clued up about comp systems, and uk.d-i-y for
folks clued up about life the universe and everything :-)]

I have a 128M CF card which has recently started playing up in my digicam
(Nikon Coolpix 3100 fwiw). After taking a lot of pictures the camera
suddenly reports that the card is not formatted. I can recover the pictures
from the card (using various commercial utilities, or dd-ing to an image and
pulling out chunks starting with the jpeg header from the image file). When
I do this usually some of the later images are corrupt: typically they will
display OK in a thumbnail view but attempting to view at full size the whole
image is momentarily displayed at reduced resolution but then a portion of
the image (starting at the left side) is replaced by blank or garbage as the
veiwer attempts to display it at full resolution. (I guess this is related
to the format of jpeg images?)

Anyway I can reformat the card and it works OK, but the problem recurs.
Sometimes when recovering images I find I still have images from earlier
shoots 'further down' the card, suggesting that the card isn't failing at
some particular memory location but more-or-less randomly. I have a
'reference' duff CF card :-) which the camera (and PC via card reader)
report as unformatted even after a format and this card isn't showing that
symptom, but the repeated occurrences of the problem and the fact I don't
get any problems on another CF card (though that is only 32Mb) suggests that
it's the card at fault rather than the camera.

Is there any way of testing to be sure, using what I have he the camera
itself, a usb card reader, linux and win2k systems, some loo rolls and
sticky-back plastic ... :-) ?


how about this?

$ dd if=/dev/random of=/tmp/cf.img bs=1024 count=$((1024*128))

to make an image of random bytes.

$ md5sum /tmp/cf.img

to get a checksum for it

$ dd if=/tmp/cf.img bs=1024 of=/dev/cf-device

to copy it to the card

$ md5sum /dev/cf-device

to checksum the card

if the sums match, the card is probably ok.

maybe make a script to do this n times to be sure.

--
http://www.niftybits.ukfsn.org/

remove 'n-u-l-l' to email me. html mail or attachments will go in the spam
bin unless notified with [html] or [attachment] in the subject line.