From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LVKs0-0007mY-BF for garchives@archives.gentoo.org; Fri, 06 Feb 2009 07:11:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E92DAE046C; Fri, 6 Feb 2009 07:11:16 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id 9F2C3E046C for ; Fri, 6 Feb 2009 07:11:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.37,390,1231113600"; d="scan'208";a="70656749" Received: from unknown (HELO compaq.stroller.uk.eu.org) ([213.152.39.90]) by smtpout.karoo.kcom.com with ESMTP; 06 Feb 2009 07:11:15 +0000 Received: from [192.168.1.71] (unknown [192.168.1.71]) by compaq.stroller.uk.eu.org (Postfix) with ESMTP id 3511F137B69 for ; Fri, 6 Feb 2009 07:11:14 +0000 (GMT) Message-Id: <5402825E-740B-4ACC-9B67-E9AF5390714D@stellar.eclipse.co.uk> From: Stroller To: gentoo-user@lists.gentoo.org In-Reply-To: <1233898098.21997.10.camel@localhost> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [gentoo-user] testing a corrupt SD card Date: Fri, 6 Feb 2009 07:11:11 +0000 References: <1233898098.21997.10.camel@localhost> X-Mailer: Apple Mail (2.930.3) X-Archives-Salt: 795c7da9-e420-448c-a0a0-fe96e32912ae X-Archives-Hash: e7c44f756f87e0652ebe101f2a172e6d 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.... > 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" 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. Personally, I wouldn't be happy with one file being copied & stored ok, but I'd probably be happy if the card had proved itself to safely store 1000. And 3meg - 6meg is the size of the jpegs taken by my mum's camera. I would want to fill up the card, as flash cards try to avoid the bad blocks - if you don't fill it, you could be missing some duff block every time; once you've filled it you know that all the blocks are good. For some values of "good", that is - you don't know about longevity, and these cards are really just black boxes to us - we have no idea what magic goes on inside. 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. Stroller.