public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] testing a corrupt SD card
@ 2009-02-06  5:28 Iain Buchanan
  2009-02-06  7:11 ` Stroller
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Iain Buchanan @ 2009-02-06  5:28 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

Hi all,

recently my SD card just went bonkers.  Unfortunately I lost a lot of
photos on it (backups are useless until the data actually gets to the
backup...) but fortunately I was able to use a program to recover about
170 photos.

Anyway, I don't know if it was just static, shock, dead card, or phase
of the moon, so I would like to see if the card is good before I
continue to use it.

I've reformatted it and I get:
$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mmcblk0p1          500960    500960         0 100% /media/PICS

so I created a file:
dd if=/dev/urandom of=Desktop/random.img bs=1024 count=500960

then copied it to the card, and then copied it back as random-2.img.  If
I md5sum the two files, they are identical:
$ md5sum random*
9dcac25cfd8585be5939c0ff969de310  random-2.img
9dcac25cfd8585be5939c0ff969de310  random.img

Does that mean my memory card is good to go, or should I use some other
method of bad sector detection?

It's a Lexar Media 512Mb SD card, a couple of years old.  Yes I know I
can get a cheap 2Gb for <$20 but I'm more interested in the principle of
the test :)

thanks for any tips!
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

This sentence contradicts itself -- no actually it doesn't.
		-- Douglas Hofstadter




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-02-11 16:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06  5:28 [gentoo-user] testing a corrupt SD card Iain Buchanan
2009-02-06  7:11 ` Stroller
2009-02-11  0:50   ` Iain Buchanan
2009-02-06 16:47 ` [gentoo-user] " James
2009-02-11  0:54   ` Iain Buchanan
2009-02-06 22:21 ` [gentoo-user] " Stroller
2009-02-11  0:54   ` Iain Buchanan
2009-02-11 16:09     ` Stroller
2009-02-07  1:36 ` Paul Hartman
2009-02-07  1:38   ` Paul Hartman
2009-02-11  0:59   ` Iain Buchanan
2009-02-11 16:14     ` Paul Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox