4

I have scandisk 16GB pendrive which accidentally got write protected(s/w as there is no hardware write protection feature availiable).

I have tried sudo hdparm -r0 /dev/sdb1 still it is write protected.

What other ways availiable to remove the write protection?

siddhu619
  • 117
  • Does mount -o remount,rw /dev/sdb1 /mountpoint not work? What does dmesg say? journalctl -e? – waltinator Dec 09 '17 at 06:30
  • 1
    There can be different problems, that make the drive read-only. You can try according to the following link (try first the options in the list "The drive is read-only ..."), https://askubuntu.com/questions/144852/cant-format-my-usb-drive-i-have-already-tried-with-mkdosfs-and-gparted/933035#933035 ; You can also try to mount the drive manually according to the following link, https://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition/956072#956072 – sudodus Dec 09 '17 at 09:12
  • @waltinator : I have tried mount -o remount,rw /dev/sdb1 /mountpoint and dmesg log : Direct-Access SanDisk 1.26 PQ: 0 ANSI: 5 [ 1795.509415] sd 8:0:0:0: Attached scsi generic sg2 type 0 [ 1795.510302] sd 8:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 1795.511158] sd 8:0:0:0: [sdb] Write Protect is on [ 1795.511169] sd 8:0:0:0: [sdb] Mode Sense: 43 00 80 00 [ 1795.511442] sd 8:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 1795.523481] sdb: sdb1 [ 1795.525272] sd 8:0:0:0: [sdb] Attached SCSI removable disk – siddhu619 Dec 10 '17 at 05:21
  • Am I facing this issue: http://forums.sandisk.com/t5/All-SanDisk-USB-Flash-Drives/SanDisk-Cruzer-Blade-16GB-write-protected-error/td-p/253484/page/7 – siddhu619 Dec 10 '17 at 05:47
  • Maybe you are facing that issue. But you should try first according to the list in my previous comment before giving up on the drive. – sudodus Dec 10 '17 at 17:14

1 Answers1

1

Try this answer by Angel Genchev: USB turn write protection off

To turn off disk device`s write protect, we use the low level system utility hdparm like this:

sudo hdparm -r0 /dev/sdb

where we asume that /dev/sdb is the Physical disk device we're working on. If the device has partitions that are mounted as read-only, you should re-mount 'em as read-write in order to write data to them.

Hope that helps.

You should run sudo hdparm -r0 /dev/sdb rather than sudo hdparm -r0 /dev/sdb1. So run your command but without the 1 at the end. You specify the device itself as a whole and not the partition number.

marko
  • 928