Unable to format USB pendrive


I'm unable to format a 16GB pendrive thus at this point it's unusable!
It says it write protected. I tried to remove it but it never allows me to format.
I must say that I searched the forum and the internet and tried many options (commands) both on Manjaro and Win10 and none of them worked.

How can I solve this?


Did you try gparted?

Did you try this:


[jesuslinux@jesuslinux ~]$ lsblk
sda      8:0    0 111,8G  0 disk 
├─sda1   8:1    0 105,4G  0 part /
└─sda2   8:2    0   6,4G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  
[jesuslinux@jesuslinux ~]$ lsblk
sda      8:0    0 111,8G  0 disk 
├─sda1   8:1    0 105,4G  0 part /
└─sda2   8:2    0   6,4G  0 part [SWAP]
sdb      8:16   1    15G  0 disk 
├─sdb1   8:17   1   1,9G  0 part 
└─sdb2   8:18   1   2,4M  0 part 
sr0     11:0    1  1024M  0 rom  
[jesuslinux@jesuslinux ~]$ sudo dd if=/dev/zero of=/dev/sdb status=progress oflag=sync
[sudo] password for jesuslinux: 
18285056 bytes (18 MB, 17 MiB) copied, 325 s, 56,3 kB/s 
dd: writing to '/dev/sdb': Input/output error
35714+0 records in
35713+0 records out
18285056 bytes (18 MB, 17 MiB) copied, 324,702 s, 56,3 kB/s
[jesuslinux@jesuslinux ~]$ 

After doing the above Gpartep is unable to create new partition of format...

Can you check another flash drive if it works? I have seen such a behaviour in devices that have a hardware problem.

Just formatted a 2GB USB using Gparted, no issues.

The 16GB USB that is not able to format does not have any physical switch, it's PNY brand.

How old is the drive?

With your usb attached, run

sudo parted -l

and identify it's partition table and filesystem. If msdos and FAT32 you could try to repair the filesystem in case there are any damages or inconsistencies:

fsck.fat -a /path/to/mountpoint

replacing /path/to/mountpoint with the actual path.

Yap! Hardware problem. Since it's a 16GB drive it's fairly new. Meaning not a 10 year old one. The "Write Protected" message is a solution several manufacturers do. If the drive is faulty but the controller works fine, it blocks write access to the drive in order for the user to have a better chance retreiving their data.

Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  16,0GB  16,0GB  primary  ntfs

[jesuslinux@jesuslinux ~]$ fsck.fat -a /path/to/sdb
fsck.fat 4.1 (2017-01-24)
open: No such file or directory
[jesuslinux@jesuslinux ~]$ fsck.fat -a /dev/sdb
fsck.fat 4.1 (2017-01-24)
open: Permission denied

It's about 3 years old max...

OK, absolute age isn't really that important, the amount of use is. That is, is it possible that it has simply been used to the point where the flash memory is worn out?

I don't think so.
I used it a few times to burn manjaro.iso and Win10.iso to install on other laptops.
Then I installed PortableApps to use on Win10 with Veracrypt, but I have been using an SDCard for that.

I pretty much didn't use it untill now...

Have you tried it in a Windows machine, if you have access to one?

Yes! And did the CMD Diskpart thing I've seen in several YT videos...

I think you should just accept that it's broken

Ok this is very weird!
I was able to burn a manjaro.iso to the USB using the dd command on my laptop using Manjaro OS.

Guess what?
The pen boots to manjaro on Win10 laptop but does not on Manjaro OS laptop!

I didn't try to format it yet.
I want this pen to have Manjaro xfce on persistent mode (save settings/apps etc) to boot from laptops using Win10.

How weird is that?

I keep having the same problem with this USB drive!
I burn some ISO and then it stops working...
I can't write Manjaro to it as I did...

Where i live a 16GB USB3 pen drive is roughly 6€.

1 Like

Forum kindly sponsored by