A Request To Those With Sd Card Corruption


Prometheus

Well-Known Member
Joined
Mar 8, 2008
Messages
9,472
I just had a thought occur to me whilst responding to Robotron therapy as needed's "Are Your Sdhc/sdxc Cards Working Perfectly?" thread, and I think maybe I ought to post it separately, as I don't want to hijack the thread.

I'm wondering whether those who are encountering SD Card corruption problems might be using cards containing less reliable, lower-grade flash memory chips (or chips that are very old and are slowly starting to wear down a bit).

There is an easy way to determine this, as long as you have access to either a system running Microsoft Windows, or an x86 Linux or Mac OS X setup with a recent version of WINE installed. What you need to do is download and run the program H2testw. This is usually used to test for false-capacity fake cards, but it also has the side effect of letting us know how many bad sectors a flash storage device has, and by extension, the likely quality of the chip inside it.

If you're having corrupted SD Card troubles, please can you follow these steps? I'm curious to see whether this hunch is right or not. :p

1: If your SD Card has been corrupted recently and you have not fixed or reformatted it yet, please do so now. As far as I know, H2testw requires cards to be in FAT32 format (though it may also be ok with FAT16, but I don't know for certain), so if your card is using something else, please back up its contents and format it to FAT32. This should also make sure that the results in this thread are something vaguely nearing scientific.

2: Download H2testw to your desktop, or wherever you would find most convenient to run it from.

3: Connect your SD Card or SD Card reader to your computer. If you're using Linux or Mac OS X with WINE, you will need to make sure that the card is mounted first (just opening it in your file manager ought to do it, if the OS doesn't automatically do so), or else H2testw won't see it.

4: Run H2testw. You'll see a window that looks like this;

H2testw.gif


The default language for this app is German, since it was commissioned by a German magazine. However, it has a radio button to switch it to English. Once you've set which language you want to use, click on the "Select Target" button and navigate to the SD Card that you plugged in during step 3.

5: Once you've made sure that you've selected the correct target, check that the radio button for "All available space" is checked (the space on the card will be displayed in brackets after "All available space"). After this, click on the "Write + Verify" button.

6: Depending on the size of the card, the speed of the card, the speed of your card reader, and other such factors, you may have a lot of waiting to do while the device is being tested. Do not touch or disconnect the SD Card during this time. You are free to do other things with your computer, but do be sure to check on how the test is doing once in a while.

7: When the test completes, you should see something a little bit like this;

h2testw-bad.png


This screenshot shows bad test results from a fake card. If your results look like this, this is why you're having a problem. Most likely, however, your results will not look quite like this, and they will tell you that the card is ok. What we are interested in here is how much memory H2testw determined was fine, excluding reasonable formatting overheads - this will tell us how good the flash memory chip in the card is. For example, a 2GB card with a good Grade A flash memory chip, formatted as FAT32, will have 1.9GB of usable space. If it is a Grade B chip, this would be 1.8GB, or even 1.7GB or lower.

8: H2testw tests memory by writing some files to your card. Once you've posted the results here, you can safely delete these files and put your stuff back on the card.

Please copy and paste your test results in a reply to this thread if you've had SD Card corruption issues. I want to know if there's a common factor with this problem.

Credit where due: The screenshots were borrowed from a couple of the top results for "h2testw" in Google Image Search, as I currently do not have H2testw on my system due to a recent OS clean-up.
 
Last edited by a moderator:
Prometheus said:
2: Download H2testw to your desktop, or wherever you would find most convenient to run it from.
What a horrible website. I have little interest in reading the text...
This is the download link
ftp://ftp.heise.de/pub/ct/ctsi/h2testw_1.4.zip

I thought I had a bad download - actually, i don't seem to have installed wine on this OS yet!

Results :
Warning: Only 4377 of 15185 MByte tested.
Test finished without errors.
You can now delete the test files *.h2w or verify them again.
Writing speed: 5.73 MByte/s
Reading speed: 13.6 MByte/s
H2testw v1.4

df:
/dev/sdc1 15549952 15549632 320 100% /media/MEDIA
(16 GB PNY class 4)
 
Last edited by a moderator:
I think my card was okay.

Code:
Warning: Only 15310 of 15311 MByte tested.
Test finished without errors.
You can now delete the test files *.h2w or verify them again.
Writing speed: 11.6 MByte/s
Reading speed: 19.4 MByte/s
H2testw v1.4

Thanks for chasing all this up and going to the trouble of writing it up, though.
 
Don't have a Pandora yet but thought it would be good to go ahead and check this anyway.

16GB Sandisk Ultra (formerly Ultra II) SDHC class 4 (rated 15MB/s)

Formatted with Panasonic Sd Card Formatter (thanks to those who posted that)

Test results:

Test finished without errors.
You can now delete the test files *.h2w or verify them again.
Writing speed: 7.08 MByte/s
Reading speed: 7.55 MByte/s
H2testw v1.4

Writing 15178MByte 35:42 min
Verified same 33:29 Min

Not bad I suppose, I know the speed reported seems far below the stated 15 MB/s rate but I wonder how much of that is due to the SD card reader being the one in my laptop which despite reading most SD card readers couldn't read SDHC without some sort of update, I was happy to see it actually did, but I am guessing it's at a reduced speed. At least the card seems fine. SO that's good!
 
Hahaha, damn. It's not showing the size I was looking for at all, is it? :lol: Sorry guys. Guess I was barking up the wrong tree.
 
Maybe yes, maybe no...in any case you managed to get me to install the formatter and check my card, no harm in that right?

just because we had decent cards doesn't mean those with problems don't have bad cards. At least no ne can say when I pop this card into my Pandora that IT might be the culprit right?
So those with Pandora's probably should do this test if nothing else, to be sure.
 
Aye, no harm indeed. :)

It's a good idea to test any sort of flash memory, really, Pandora or not. Fakes are frighteningly prevalent*, and even where fakes aren't concerned, it's probably a decent enough way to roughly check that you've gotten what you've paid for in terms of storage and speed.

*(There have reportedly even been occasions where a fake or two has gotten into genuine stores, apparently. I can easily believe this, given a recent occurrence regarding Tesco, which is Britain's biggest supermarket chain, and the world's second-largest retailer after Wal-Mart. Whilst not flash-memory-related, they ended up sourcing and selling some counterfeit bottles of wine recently.)
 
my problem was a partition table looking very much like 0x00000000.... Recovered it, and looking fine. (this is the first time I corrupted an SD, whilst trying to test for data i/o errors)
 
I guess all this does is write data to the full size of the card and read it back again? It would be nice to have a utility to do this on the pandora itself. Even a bash script would do. Now itching to get my pandora and start coding even more...
 
I think it does more than that, like write patterns and some other checks to detect for mapper issues (mirroring, not writing at all, getting random garbage, missing bits/bytes, bits/bytes out of order, etc).

Writing a program that open()s the device directly and does these tests probably wouldn't be terribly difficult.
 
Back
Top