Page 1 of 1

Same model cards working differently

Posted: Thu Jun 16, 2016 3:41 pm
by lgenzelis
Recently, I bought three micro sd cards, all branded Kingston SDC10G2/16GB. The three of them were made in Taiwan (I read somewhere that cards from there had the highest fail rate). However, the cards don't look the same. Two of them look like this:
working sd.png
working sd.png (62.42 KiB) Viewed 1270 times
And the other one looks like this:
non working sd.png
non working sd.png (63.01 KiB) Viewed 1270 times
There are two entries for this model on the list of supported sd cards for the raspberry (http://elinux.org/RPi_SD_cards). One of them says they work, the other one says they don't. In my case, both cards that look like the first image work without problems. The other one, however, does not seem to work with the raspberry. I tried a raspberry 3 and a raspberry B+, and things go well (I can run programs, browse the internet, etc) until I do an apt-get upgrade. I formatted and flashed os images several times, and the same happens every time. I do an upgrade, and things get corrupted: messages like "insserv: There is a loop between service umountfs and halt if stopped", "systemd-logind.service failed", and nothing works anymore. The weird thing is, the card seems to work flawlessly. A badblocks test run from my pc, for example, shows 0 bad blocks. So, the question here is: What does the raspberry do differently? Does it use a micro sd card reader of less quality than a pc one or something like that?.

I'm not trying to get the card to work. I just want to understand what could be causing this seemingly random behaviour.

Re: Same model cards working differently

Posted: Tue Jun 21, 2016 8:57 am
by martinhj
See my thread on the same issue. BerryPicker responded to mine (down at the end of the thread) which links you to some posts all about this

viewtopic.php?f=63&t=149352&p=983384#p983384

Re: Same model cards working differently

Posted: Tue Jun 21, 2016 9:03 am
by RaTTuS
http://www.heise.de/download/product/h2 ... 9/download
test the sdcard to see if it is fake

Re: Same model cards working differently

Posted: Tue Jun 21, 2016 9:33 am
by martinhj
From all the posts on here about these it may be better if they were fake :-)

Re: Same model cards working differently

Posted: Tue Jun 21, 2016 10:28 am
by HawaiianPi
Don't waste time on other cards. Get Samsung EVO Plus cards. They are competitively priced but offer outstanding performance that you will actually feel when using your Pi. They outperform pretty much everything in their price range (and many more expensive cards) in random read/write, which makes a difference when used as a computer OS drive.

And those cards you pictured do not look like the same model. The one that you said doesn't work is U1 rated, while the other two do not appear to be.

Re: Same model cards working differently

Posted: Tue Jun 21, 2016 8:06 pm
by lgenzelis
Thank you for your feedback everyone. Your links points to other people having trouble with this card model. So I'm not alone! :D

This link https://github.com/raspberrypi/linux/issues/1416 pretty much answers my question. According to this, my card is telling the raspberry "hey, if you want to erase something from me, use this shiny ERASE command" (there seems to be another way of erasing data from sd cards, that works regardless of whether the card implements this ERASE command of not). However, this ERASE command is broken, and it is erasing more than it should. That's why, after performing an update, things get corrupted. From that github link, it seems like people have just decided to release an updated firmware that avoids using the ERASE command (I didn't get if they are not going to use it just with Kingston cards, or with any card).
RaTTuS wrote:http://www.heise.de/download/product/h2 ... 9/download
test the sdcard to see if it is fake
I don't have access to a windows machine right now, but I don't think that program is going to show anything wrong with the card. I purchased it from a verified retailer. And besides, the linux badblocks program showed none bad blocks.
HawaiianPi wrote:Don't waste time on other cards. Get Samsung EVO Plus cards. They are competitively priced but offer outstanding performance that you will actually feel when using your Pi. They outperform pretty much everything in their price range (and many more expensive cards) in random read/write, which makes a difference when used as a computer OS drive.

And those cards you pictured do not look like the same model. The one that you said doesn't work is U1 rated, while the other two do not appear to be.
The price tag is really different (at least in my country). I could buy 5 kingston cards like mine for the price of one Samsung EVO Plus.
Both cards I pictured are branded Kingston SDC10G2/16GB. And what you've just pointed makes things even weirder. So, the cards non U1 rated work, while the U1 rated one doesn't (it could be because the U1 rate one implemets the ERASE command I was talking about before, while the non U1 rated ones don't).

Re: Same model cards working differently

Posted: Wed Jun 22, 2016 5:11 am
by edo1
lgenzelis wrote:
RaTTuS wrote:http://www.heise.de/download/product/h2 ... 9/download
test the sdcard to see if it is fake
I don't have access to a windows machine right now
I do this simple test on linux host, it helps me to find fake/broken usb flash and sd cards (and I found a lot of them).

BEWARE: this test takes a long time and erases all data on your flash!

1. replace /dev/sdy with your device name and run

Code: Select all

DEV=/dev/sdy; openssl rand `blockdev --getsize64 $DEV` | tee $DEV |md5sum; sync
2. eject and re-plug flash

3. run

Code: Select all

md5sum $DEV
you should get the same checksum as before, otherwise your flash device is bad.

you could repeat this test 2-3 times (very seldom flash goes bad only on second run).
after this test IMHO it is better to clean flash with

Code: Select all

dd if=/dev/zero of=$DEV bs=4k

Re: Same model cards working differently

Posted: Mon Jun 27, 2016 2:34 pm
by lgenzelis
edo1 wrote:I do this simple test on linux host, it helps me to find fake/broken usb flash and sd cards (and I found a lot of them).
Thanks! But I've already tested the sd card with badblocks (with both destructive and non-destructive tests) and it shows no errors. Besides, I gave the card to someone who was planning to use it in her phone (where the card works properly), so I don't have it anymore.