Mount "locked" SD card as read-write in GNU/Linux

4

2

My Canon PowerShot A470 + CHDK can write to SD-cards that are "locked" (the lock switch is used to make the card bootable), but GNU/Linux

`/dev/mmcblk1': Read-only file system

(I'm using "Texas Instrument 5-in-1 Multimedia Card Reader")

So I have to switch that switch on and off again and again. ("unlocked" to write to the card in Linux, "locked" to boot the camera from it).

How to force locked card to be writable in GNU/Linux?

Vi.

Posted 2010-02-09T21:20:12.360

Reputation: 13 705

CHDK for the win! – Nathaniel – 2010-04-05T02:18:08.677

Answers

3

USB card readers are handled by the generic mass storage driver, and if I understand the spec correctly, it's the device's job to declare itself write protected and to ignore all attempts to change this state (WP flag in the mode parameter header), so I doubt the driver offers a facility to do this - and you'd still need a card reader with a firmware that violates the spec.

Michael Borgwardt

Posted 2010-02-09T21:20:12.360

Reputation: 3 047

1I know this is an old question and answer, but just to clarify one thing: The read only switch on an SD card is not an electrical switch. Rather it is the SD card socket's job to detect the state of this switch, typically using an IR sensor. If the camera ignores the switch it's probably either because the sensor is broken, or they cheaped out on using a socket that can detect the switch. – nitro2k01 – 2012-08-14T00:51:10.227