2

I have not one but two flash drives that were previously working fine until I installed chrome os on them. After doing so, the drives act as if they are write protected in windows. They cannot be formatted.

I boot up a Ubuntu live cd and used gparted to format and create a new fat32 volume. Within Ubuntu the volume is usable and I can write files to it. In windows the volume is visible but I cannot write to it. I am also still unable to format the volume. This is also repeatable on another computer so i'ts not a problem with my computer.

Here are my results from different attempts to format the drive.

Diskpart clean command gives me Diskpart has encountered an error. Incorrect function.

Diskpart format gives me Diskpart has encountered an error. The parameter is incorrect.

Diskpart Detail Disk shows that the read only flag is not set. I have run attributes disk clear readonly anyway with no change.

If I try to format from Disk Manager I get the message "The operation did not complete because the media is write-protected.

mUSBfixer instantly tells me that the volume was successfully formatted but it isn't.

HP USB disk storage format tool says "Device media is write-protected."

I have tried creating the WriteProtect registry key under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies" and setting it to 0 to no effect.

There is no write protect switch on the drives themselves.

If this were just one drive I would just assume the drive is bad and not worry about it. But two drives at the same time that both happened to have chrome os installed on them suggests otherwise.

1 Answer 1

1

When you formatted the memory stick in Ubuntu, did you also set up a new MS-DOS partition table? Windows gets glitchy if the stick has a partition table it doesn't know about, or even multiple partitions on most usb sticks. Giving it a brand new partition table will probably do it.

Assuming that doesn't help, the final solution is to null the table and set up a new one, effectively resetting the usb stick completely. But, mistyping the command could lead to accidentally deleting your internal HDD instead. From within Ubuntu, open up a terminal and sudo su, then lsblk. You'll see a list of the detected disks and partitions:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   114G  0 disk 
└─sda1   8:1    0   114G  0 part /
sdb      8:16   1    16G  0 disk 
└─sdb1   8:17   1    16G  0 part
sr0     11:0    1  55,4M  0 rom  

You can tell that sdb is the usb stick from its size (16GB). It's fine if you see multiple partitions below it (sdb1, sdb2 etc) we only care about the sdb disk itself. So once you make sure which disk is your usb stick, replace sdb below:

dd if=/dev/zero bs=8k count=8192 conv=sync,noerror of=/dev/sdb

Now take the stick out and plug it back in, open up gparted, set up an msdos partition table and make a FAT32 partition like before. Should be good!

1
  • Thanks, that seems to have fixed it. Now diskpart has no problems cleaning or partitioning the drive. The drive already had an MS-DOS partition table but wiping it clean with dd and recreating it fixed it.
    – esgeroth
    Commented Sep 21, 2015 at 23:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .