On Fri, 2009-02-06 at 07:11 +0000, Stroller wrote:
> On 6 Feb 2009, at 05:28, Iain Buchanan wrote:
> > 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
> I thought you could get then for < $5, but anyway....
probably in USD. We (AUD) were approaching 1.00 before the exaggerated
crises, but now we're back to 0.645; and plus I needed one in a hurry,
so I couldn't order from a PC store which has reasonable prices and
instead had to go for a local and slightly more expensive retailer...
> > 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?
> I'd be more or less happy with that methodology, had I copied a
> thousand files to the card & they checked out good.
> Of the top of my head I don't know how big your "bs=1024 count=500960"
well, I got that from the free space on the card, using df and some
mathemagics, so it 100% fills the free space... however...
> file is - I would make a Bash script generate files c 5meg in size
> (maybe alternative between 3meg & 6meg?) and copy them to the card
> until it fills up. Then check them, delete them and do so again until
> all 1000 have been copied & checked.
however my method and your suggestion only fill up the free space, and
not the FAT for example, so there could be corruptions there, and given
I could see files but the names were nnnxxnnxnnn.ddxxc and so on, I
think it could have been a corrupt FAT?...
I should have made a file the size of the whole SD card, and just
written it to and read from the device a couple of times, overwriting
the partition table, and FAT.
> Personally, for my money, I don't know if I'd trust it. Depends what
> you're storing on it. MP3s for my phone? Sure - I have a backup at
> home. Moving files onto my PS3 or Wii, sure. For my camera? Maybe I'd
> be a bit cautious.
Bought a new 2Gb. Unfortunately I want a 512Mb card cause then I'm
forced to back it up often enough.
Iain Buchanan <iaindb at netspace dot net dot au>
Men have a much better time of it than women; for one thing they marry later;
for another thing they die earlier.
-- H.L. Mencken