A µSD card that was in a security camera suddenly stopped recording:
- Much of the data is gone (not a problem).
- The data that is still there is correct and readable.
- The card now always mounts as read-only, (on Chromebook, Windows, and Ubuntu).
I can't reformat it or do much of anything with it:
$ df
/dev/mmcblk0 vfat 117G 15G 102G 13% /media/ray/xxx
$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 116.1 GiB, 124657860608 bytes, 243472384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
$ sudo fsck /dev/mmcblk0
fsck from util-linux 2.34
fsck.fat 4.1 (2017-01-24)
open: Read-only file system
$ sudo hdparm -r0 /dev/mmcblk0
/dev/mmcblk0:
setting readonly to 0 (off)
readonly = 1 (on)
$ sudo hdparm -r0 /dev/mmcblk0
/dev/mmcblk0:
setting readonly to 0 (off)
readonly = 1 (on)
$ sudo fsck /dev/mmcblk0
fsck from util-linux 2.34
fsck.fat 4.1 (2017-01-24)
open: Read-only file system
$ sudo umount /media/ray/xxx
$ sudo mount -o rw /dev/mmcblk0 /media/ray/xxx
mount: /media/ray/xxx: WARNING: device write-protected, mounted read-only.
Note that this is not a full-sized SD card; there is no physical write-protection switch.
Is the card salvageable, or garbage?