I want to remove write protected from pen drive or just I want to format it but I'm unable to do so.
$ sudo mkfs -t vfat /dev/sdb1
mkfs.vfat 3.0.14 (23 Jan 2023)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system
How can I resolve this?
I want to remove write protected from pen drive or just I want to format it but I'm unable to do so.
$ sudo mkfs -t vfat /dev/sdb1
mkfs.vfat 3.0.14 (23 Jan 2023)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system
How can I resolve this?
Check whether your pen drive has a write protect switch on it, if none, the following command should help:
sudo hdparm -r0 /dev/sdb