SD card lock switch causing problems

Yesterday while working i needed to tranfer some file to a sd card. This is a simple task, trivial thing to do but i was having trouble doing it. My card reader refused to read my SD card, no matter what i did, started looking at logs, dmesg and so on. after a while without significant info found i tried the card on a friends lap and it worked without a itch.

The only thing that showed up in var log messages was:

Jun 23 19:17:43 martini-lap kernel: sd 7:0:0:0: [sdb] Unhandled sense code
Jun 23 19:17:43 martini-lap kernel: sd 7:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jun 23 19:17:43 martini-lap kernel: sd 7:0:0:0: [sdb] Sense Key : Medium Error [current]
Jun 23 19:17:43 martini-lap kernel: sd 7:0:0:0: [sdb] Add. Sense: Unrecovered read error
Jun 23 19:17:43 martini-lap kernel: end_request: I/O error, dev sdb, sector 0
Jun 23 19:17:43 martini-lap kernel: Buffer I/O error on device sdb, logical block 0
Jun 23 19:17:43 martini-lap kernel: Buffer I/O error on device sdb, logical block 1
Jun 23 19:17:43 martini-lap kernel: Buffer I/O error on device sdb, logical block 2
Jun 23 19:17:43 martini-lap kernel: Buffer I/O error on device sdb, logical block 3

well the prob was the tiny switch on the SD card that allows you to lock on read only mode. The card was lacking the switch, with some adesive tape it was fixed. The strange thing is that it worked on my friends lap. Maybe it’s lap doesn’t check for the lock switch.

Hope this may help someone out there with the same prob.

Cheers.

Pedro

Click to access the login or register cheese