1

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?

  • Does mount -o remount,rw /dev/sdb1 /mountpoint not work? What does dmesg say? journalctl -e? – waltinator Dec 9 '17 at 6: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 ..."), askubuntu.com/questions/144852/… ; You can also try to mount the drive manually according to the following link, askubuntu.com/questions/11840/… – sudodus Dec 9 '17 at 9: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 5:21
  • Am I facing this issue: forums.sandisk.com/t5/All-SanDisk-USB-Flash-Drives/… – siddhu619 Dec 10 '17 at 5: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
0

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.

  • 1
    I have tried : sudo hdparm -r0 /dev/sdb but it didn't help. – siddhu619 Dec 10 '17 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.