Page 1 of 1

Remove write protection on a usb drive

Posted: Thu Apr 27, 2023 8:53 am
by Chris
ho do I remove write protection on a usb drive ?

I have a drive that I want to format.
but when I try to do it under windows,
I get the message that the drive is write-protected.

Re: Remove write protection on a usb drive

Posted: Thu Apr 27, 2023 11:09 am
by Chris
Best is to erase the partitions with fdisk or gparted
and create new ones.

Re: Remove write protection on a usb drive

Posted: Thu Apr 27, 2023 6:41 pm
by Chris
You can check with hdparm :

Code: Select all

sudo hdparm /dev/sdc

/dev/sdc:
 multcount     =  0 (off)
 readonly      =  1 (on)
 readahead     = 256 (on)
 geometry      = 15904/64/32, sectors = 32571392, start = 0
Change it with:

Code: Select all

sudo hdparm -r0 /dev/sdc1
If it doesn't work, it might be a problem with the USB drive.