public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Iain Buchanan <iaindb@netspace.net.au>
To: "gentoo-user@lists.gentoo.org" <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] testing a corrupt SD card
Date: Fri, 06 Feb 2009 14:58:18 +0930	[thread overview]
Message-ID: <1233898098.21997.10.camel@localhost> (raw)

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




             reply	other threads:[~2009-02-06  5:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06  5:28 Iain Buchanan [this message]
2009-02-06  7:11 ` [gentoo-user] testing a corrupt SD card 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

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=1233898098.21997.10.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