views:

2338

answers:

4

Do any one know a software to check AND mark bad blocks on SD card?

To clarify - bad block is a block of card which can't store data. The problem is - no error reported on read or write operation. The only way to check it is to write data and then read it. There is tool to check and find those blocks, but it will not mark them as bad.

It there are many, please tell which of them are freeware.

ps. Old formating software could mark bad blocks, but only on device errors.

UPD. I need it to support FAT12 (default on SD card). And it could be for WinCE, win or unix.

+1  A: 

Considering an 8G SD card is about $15 these days, I would just chuck the bad card and buy yourself a brand new one.

jrockway
It is not for personal use. If you have 100 cards in use it is not so easy to recheck them all and change. But we had to do so now. :(
Malx
If the card is already starting to fail, what makes you think that it is going to stop failing after you mark the blocks that appeared to be bad today?
jrockway
Is is not. But I could use it until it fails in all blocks :)
Malx
+2  A: 

SD cards include controller circuitry to perform bad block management and wear leveling.

If you're starting to see bad blocks at the user level, the memory is just plain bad.

Michael Burr
I have read that it is not enough. There is "Ultimate Software Solution for High-Performance Flash Storage"
Malx
+1 on this advice. Malx: Your ultra-cheap commodity hardware is failing. Replace it before you lose important data.
jrockway
@Malx - the software you're referring to (Samsung's XSR) is the type of thing that would go into an embedded system/device using NAND flash parts. In fact, I wouldn't be surprised if it's what Samsung puts on SD card microscontroller for SD cards they manufacture.
Michael Burr
@Michael Burr - look at PDF here:http://www.samsung.com/global/business/semiconductor/products/flash/Products_XSR_PortingGuide.htmlIt states host OS as WinXP. It is LLD low level driver. Loot at http://www.samsung.com/global/business/semiconductor/flashsoftwareInfo.do?ppmi=1174 - app area.
Malx
@jrockway - device of this type could have bad blocks from begining - http://www.samsung.com/global/business/semiconductor/products/fusionmemory/Products_FAQs_Reliability.html
Malx
@Malx - my reading of that document indicates that development is performed on WinXP - they go thorough a process of developing a 'dummy' LLD for a non-existent NAND device to run on WinXP as an example. The intent is to ultimately port the LLD and OAM (and other modules) to the target device.
Michael Burr
Michael Burr
+1  A: 

SD cards don't have low-level error checking abilities like hard disks do with SMART - your best bet is to format them using mkfs -cc to do a read-write test for bad blocks - these type of cards are more likely to fail when writing than when reading so a readonly test won't catch many errors, if any at all.

Or if you have the time, implement an ECC module for device-mapper...

Ant P.
Sorry, but I can't find -cc for any other then ext2/ext3 fs. But I need FAT which is default for SD cards.
Malx
A: 

Check out this nifty utility: http://sosfakeflash.wordpress.com/2008/09/02/h2testw-14-gold-standard-in-detecting-usb-counterfeit-drives/

swinefeaster
Thanks. But it is only checks for errors. It is not marking bad blocks.
Malx