Gentoo Archives: gentoo-user

From: Iain Buchanan <iaindb@××××××××××××.au>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: [gentoo-user] testing a corrupt SD card
Date: Fri, 06 Feb 2009 05:28:50
Message-Id: 1233898098.21997.10.camel@localhost
1 Hi all,
2
3 recently my SD card just went bonkers. Unfortunately I lost a lot of
4 photos on it (backups are useless until the data actually gets to the
5 backup...) but fortunately I was able to use a program to recover about
6 170 photos.
7
8 Anyway, I don't know if it was just static, shock, dead card, or phase
9 of the moon, so I would like to see if the card is good before I
10 continue to use it.
11
12 I've reformatted it and I get:
13 $ df
14 Filesystem 1K-blocks Used Available Use% Mounted on
15 /dev/mmcblk0p1 500960 500960 0 100% /media/PICS
16
17 so I created a file:
18 dd if=/dev/urandom of=Desktop/random.img bs=1024 count=500960
19
20 then copied it to the card, and then copied it back as random-2.img. If
21 I md5sum the two files, they are identical:
22 $ md5sum random*
23 9dcac25cfd8585be5939c0ff969de310 random-2.img
24 9dcac25cfd8585be5939c0ff969de310 random.img
25
26 Does that mean my memory card is good to go, or should I use some other
27 method of bad sector detection?
28
29 It's a Lexar Media 512Mb SD card, a couple of years old. Yes I know I
30 can get a cheap 2Gb for <$20 but I'm more interested in the principle of
31 the test :)
32
33 thanks for any tips!
34 --
35 Iain Buchanan <iaindb at netspace dot net dot au>
36
37 This sentence contradicts itself -- no actually it doesn't.
38 -- Douglas Hofstadter

Replies

Subject Author
Re: [gentoo-user] testing a corrupt SD card Stroller <stroller@××××××××××××××××××.uk>
[gentoo-user] Re: testing a corrupt SD card James <wireless@×××××××××××.com>
Re: [gentoo-user] testing a corrupt SD card Stroller <stroller@××××××××××××××××××.uk>
Re: [gentoo-user] testing a corrupt SD card Paul Hartman <paul.hartman+gentoo@×××××.com>