SD and microSD cards

For all your Raspberry Pi's, BeagleBoard's, Parallella's, ORDROID'S, TV boxes et al.
davidbam
General Bitchin'
General Bitchin'
Posts: 6371
Joined: Wed Aug 15, 2018 1:15 pm
Location: Huntly, Scotland
Contact:

#1 SD and microSD cards

Post by davidbam »

Whenever and wherever I buy SD cards, I always perform a full write / read / compare cycle on them. This is because many have been hacked to report a much higher capacity than they actually have. Typically, you can write data to the hacked ones but it isn't there when you read it back. This is not good.

Windows users should use h2testw

On Linux, I use f3write / f3read which operates similarly; it writes a number of 1Gb files until the media is full. Here is a 4Gb card which has been sold as a 32Gb card by this eBay seller https://www.ebay.co.uk/itm/Samsung-32GB ... 2749.l2649

Code: Select all

$ ./f3write /media/david/AC26-2B24
Free space: 28.91 GB
Creating file 1.h2w ... OK!                          
Creating file 2.h2w ... OK!                          
Creating file 3.h2w ... OK!                          
Creating file 4.h2w ... OK!                         
Creating file 5.h2w ... OK!                         
Creating file 6.h2w ... OK!                         
Creating file 7.h2w ... OK!                         
Creating file 8.h2w ... OK!                         
Creating file 9.h2w ... OK!                         
Creating file 10.h2w ... OK!                         
Creating file 11.h2w ... OK!                         
Creating file 12.h2w ... OK!                         
Creating file 13.h2w ... OK!                         
Creating file 14.h2w ... OK!                         
Creating file 15.h2w ... OK!                         
Creating file 16.h2w ... OK!                         
Creating file 17.h2w ... OK!                         
Creating file 18.h2w ... OK!                         
Creating file 19.h2w ... OK!                         
Creating file 20.h2w ... OK!                         
Creating file 21.h2w ... OK!                         
Creating file 22.h2w ... OK!                         
Creating file 23.h2w ... OK!                         
Creating file 24.h2w ... OK!                         
Creating file 25.h2w ... OK!                         
Creating file 26.h2w ... OK!                        
Creating file 27.h2w ... OK!                        
Creating file 28.h2w ... OK!                        
Creating file 29.h2w ... OK!                        
Free space: 0.00 Byte
Average writing speed: 7.31 MB/s
$ ./f3read /media/david/AC26-2B24
                  SECTORS      ok/corrupted/changed/overwritten
Validating file 1.h2w ... 2097152/        0/      0/      0
Validating file 2.h2w ... 2097152/        0/      0/      0
Validating file 3.h2w ... 1162688/        0/      0/      0 - NOT fully read due to "Input/output error"
Validating file 4.h2w ...                                  f3read: Can't open file /media/david/AC26-2B24/4.h2w: No such file or directory
I think this is fool-proof but could you just try it for me please? • There are 10 types of people in the world; those who understand binary, and those who don’t
Image
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#2 Re: SD and microSD cards

Post by scole of TSBT »

Maybe it just has a 4GB partition on it. Try SD Formatter from here...https://www.sdcard.org/downloads/formatter/

EDIT: Read closer :oops: Maybe it's just a bad card
Image
davidbam
General Bitchin'
General Bitchin'
Posts: 6371
Joined: Wed Aug 15, 2018 1:15 pm
Location: Huntly, Scotland
Contact:

#3 Re: SD and microSD cards

Post by davidbam »

Will try that formatter but the symptoms precisely match those I've had in the past.
I think this is fool-proof but could you just try it for me please? • There are 10 types of people in the world; those who understand binary, and those who don’t
Image
davidbam
General Bitchin'
General Bitchin'
Posts: 6371
Joined: Wed Aug 15, 2018 1:15 pm
Location: Huntly, Scotland
Contact:

#4 Re: SD and microSD cards

Post by davidbam »

Very interesting. This does appear to have solved the problem in one of the cards, thank you.

Still planning to return it though as - out of the box with a FAT partition - it failed to work. I could never trust it for critical data I don't think
I think this is fool-proof but could you just try it for me please? • There are 10 types of people in the world; those who understand binary, and those who don’t
Image
User avatar
Dirk Broer
Corsair
Corsair
Posts: 1962
Joined: Thu Feb 20, 2014 11:24 pm
Location: Leiden, South Holland, Netherlands
Contact:

#5 Re: SD and microSD cards

Post by Dirk Broer »

To stay on topic: how does one revive a SD card that has fallen to the 'read-only' syndrome?

If you have such a card you get such witty suggestions as:
  • "Remove "Memory card locked" Error via Lock Switch" Duh, as if I can't come up with that idea. Besides, it doesn't work, the switch is not in 'lock' position.
  • "Unlock SD Card with Password" Duh, I use no passwords on my cards.
  • "Remove Write Protection on the SD Card" Duh, tried Windows cmd commands, GParted under Linux and Linux command line: nothing works, it just shows up again as read-only when checking.
  • "Format the Memory Card" Duh, can't because of 'read-only lock'
Image
Post Reply Previous topicNext topic

Return to “Single-board Computers”