0
I want to reformat a SanDisk Cruzer Edge USB flash drive but it appears read-only:
$ sudo dd if=/dev/zero of=/dev/sdg
dd: failed to open ‘/dev/sdg’: Read-only file system
I checked the readonly status with hdparm
:
$ sudo /usr/sbin/hdparm /dev/sdg
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
multcount = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 1017/124/62, sectors = 7821312, start = 0
The readonly
flag displays off
but that I still cannot write to the drive. How do I solve this?
After running dosfsck
on the device I get this output:
$ sudo /usr/sbin/dosfsck /dev/sdg
fsck.fat 3.0.22 (2013-07-19)
Logical sector size (1766 bytes) is not a multiple of the physical sector size.
What file system is on the device ? Sometimes if the file system is corrupt, it will be mounted ro. You can check the disk for errors. – Panther – 2014-01-03T21:30:15.013
The file system is fat32. I have added dosfsck output to the question. – Jephir – 2014-01-04T19:17:37.350