From: Iain Buchanan <iaindb@netspace.net.au>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] testing a corrupt SD card
Date: Wed, 11 Feb 2009 13:50:47 +1300 [thread overview]
Message-ID: <1234313447.21507.45.camel@localhost> (raw)
In-Reply-To: <5402825E-740B-4ACC-9B67-E9AF5390714D@stellar.eclipse.co.uk>
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.
[snip]
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
next prev parent reply other threads:[~2009-02-11 8:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234313447.21507.45.camel@localhost \
--to=iaindb@netspace.net.au \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox