[OT] Testing an SD card

Volker Wysk post at volker-wysk.de
Fri Aug 19 04:50:00 UTC 2016


Am Mittwoch, 17. August 2016, 19:49:58 CEST schrieb Josef Wolf:
> On Wed, Aug 17, 2016 at 05:26:45PM +0100, Colin Law wrote:
> > On 17 August 2016 at 16:31, Volker Wysk <post at volker-wysk.de> wrote:
> > > I have an SD card for my smartphone which I suspect to be defect. Is
> > > there a command to test this? (I can copy it with dd to a file, so far
> > > it works.)> 
> > If you suspect it to be faulty (which presumably means it has done
> > something odd) then just chuck it and get a new one. Even if it
> > appears to be ok then if it has failed in some way once then it will
> > fail again. Get a good make, it is false economy to get cheap ones. I
> > generally use Sandisk.
> 
> I'm not sure whether the SD card is to blame for every failure. I have the
> feeling that (at least when connected via USB), there are multiple layers of
> buffering and the traditional "sync" command won't flush all of those
> levels. The same applies to USB sticks, of course.
> 
> Here's a script I wrote a long time ago to check whether a stick is as big
> as advertised. About 10 years ago, there were many sticks on the market
> which did not have the advertised capacity. This script will fill the whole
> stick with random data and check whether it can read back exactly the same
> data.
> 
> Make sure, you specify the CORRECT device name, or you will loose all of
> your data. Double check! The script doesn't contain any safety nets. It
> assumes you know EXACTLY what you do.
> The script won't backup the data on the stick, either.
> 
> Have fun! But beware to specify the correct name!

Hi

I've let your script run over night, and it still didn't finish. The SD card is 
64 GB large.

The output in the (small) part which is visible in the xterm, and which can be 
scrolled back, didn't contain any error messages.

Bye
Volker





More information about the ubuntu-users mailing list