Monday, April 10, 2017

linux - Do I have a bad SD card?


I'm trying to copy data from my computer to an SD card. After a few hundred megs, I keep getting the following errors in dmesg:



[34542.836192] end_request: I/O error, dev mmcblk0, sector 855936
[34542.836284] FAT: unable to read inode block for updating (i_pos 13694981)
[34542.836306] MMC: killing requests for dead queue
[34542.836310] end_request: I/O error, dev mmcblk0, sector 9280
[34542.837035] FAT: unable to read inode block for updating (i_pos 148486)
[34542.837062] MMC: killing requests for dead queue
[34542.837066] end_request: I/O error, dev mmcblk0, sector 1
[34542.837074] FAT: bread failed in fat_clusters_flush
[34542.837085] MMC: killing requests for dead queue

These were all files I copied from a smaller SD card. I just want to transfer them to my new, larger card for my phone. I tried the same experiment with different files on a different machine and the card failed again. Reading data from the old card went fine. My systems are older and the new SD card is new (16GB Class 4). Could this be that my computers are too old? Is there a definitive test to verify if my SD card is bad?


Answer



As I had a similar situation with 1GB SD cards once. If you are having trouble reading/writing larger SD cards (like write errors or you cannot get your data back), make sure that your card reader (if it is an external one) supports that size of SD cards and/or if a firmware update is available for it to support larger cards. There are a few possible pitfalls when implementing support for larger cards and some older card readers just cannot read them. If you have another card of the same size that works fine, I'd say it is not your reader(s).


Tools like F3 or h2testw on Windows are good to test the card, but they cannot detect either if it is the card or the reader.


If your phone supports that size, you can check if the phone can export the device raw (as an USB storage device) when connecting it to your PC via an USB cable. Then run the test through your phone to rule out bad card readers.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...