Why did my flash drive become "read only" and (how) can I fix it?

52

19

I have a brand new flash drive (one week old) that has become marked as read only, by Windows, Kubuntu and a bootable partitioner. Why did this happen? Is it fixable? If it is, how can I fix this?


The problem

Firstly, this drive is new. It's certainly not been used enough to die from normal wear and tear, though I would not discount defective components.

The drive itself has somehow become locked in a read only state. Windows' Disk management:

Screenshot of Disk Management

Diskpart:

Generic Flash Disk USB Device
Disk ID: 33FA33FA
Type   : USB
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : Yes
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

What really confuses me is Current Read-only State : Yes and Read-only : No.

Attempted solutions

So far, I've tried:

  • Formatting it in Windows (in Disk management, the format options are greyed out when right clicking).

  • DiskPart Clean (CLEAN - Clear the configuration information, or all information, off the disk.):

    DISKPART> clean
    
    DiskPart has encountered an error: The media is write protected.
    See the System Event Log for more information.
    

    There was nothing in the event log.

  • Windows command line format

    >format G:
    Insert new disk for drive G:
    and press ENTER when ready...
    The type of the file system is FAT32.
    Verifying 7740M
    Cannot format.  This volume is write protected.
    
  • Windows chkdsk: see below for details

  • Kubuntu fsck (through VirtualBox USB passthrough): see below for details

  • Acronis True Image to format, to convert to GPT, to destroy and rebuild MBR, basically anything: failed (could not write to MBR)

Details (and a nice story)

Background

This was a brand new, generic, 8GB flash drive I wanted to create a multiboot flash drive with. It came formatted as FAT32, though oddly a little larger than most 8 GIGAbyte flash drives I've come across. Approximately 127MB was listed as "used" by Windows. I never discovered why. The end usable space was about what I normally expect from a 8GB drive (approx 7.4 GIBIbytes).

I had thrown quite a few Linux distros on, along with a copy of Hiren's. They would all boot perfectly. They were put on with YUMI.

When I tried to put the Knoppix DVD on, YUMI added an odd video option to its boot comman which caused Knoppix to boot with a black screen on X. ttys 1 through 6 still worked as text only interfaces.

A few days later, I took some time to take that odd video option off, making the boot command match the one that comes with Knoppix. On the attempt to boot, Knoppix reported some form of LZMA corruption.

Leading up to the current issue

I was thinking the Knoppix files may have been corrupted somehow, so I tried reloading it. The drive was nearly full (45MB free), so I deleted a generic ISO that also was not booting. That went fine. I then went through YUMI to 'uninstall' Knoppix, i.e. delete files and remove from the menus. The files went first, then the menus were cleared successfully. However, the free space was stuck at about 700MB, same as it was before removing Knoppix. In the old Knoppix folder, there was a 0 byte file named KNOPPIX that could not be deleted.

I tried reinserting the drive to delete this file - without safely removing, if that made a difference (hey, first time for everything). Running the standard Windows chkdsk scan without /r or /f reported errors found. Running with /r just got it stuck.

I decided to give fsck a shot, so I loaded up my Kubuntu VM and attached the drive to it with VirtualBox's USB 2.0 passthrough. I umounted it (/dev/sda1) and ran a fsck. There are differences between boot sector and its backup. I chose No action. It told me FATs differ and asked me to select either the first or second FAT. Whichever I selected, I got a notice of Free cluster summary wrong. If I chose Correct, it gave a list of incorrect file names. To try to fix something, at least, I ran it with the -p option. Halfway through fixing the files, the VM froze - I ended its process about ten minutes later.

Cause?

My next attempt was to use YUMI, again, to rebuild the whole drive. I used YUMI's built in reformat (to FAT32) option and installed a Kubuntu ISO (700MB). The format was successful, however, the extract and copy of Kubuntu (which YUMI uses a 7zip binary for) froze at about 60% done. After waiting for about fifteen minutes (longer than the 3.5GB Knoppix ISO took last time), I pulled the drive out. The drive at this point was already formatted, SYSLINUX already installed, just waiting on the unpacking of an ISO and the modifying of the boot menus.

Plugging it back in, it came up as normal - however, any write action would fail. Disk management reported it as read only. On reconnect, it would come up as normal but a write operation would cause it to go read only again. After a few attempts, it started coming up as read only on insertion.

Attempts to fix

This is when I ran through the attempts listed above, to try and reformat it in case of a faulty format. However the inability to do so even on a bootable disk indicated something more serious is wrong. chkdsk now reports nothing is wrong, and fsck still reports MBR inconsistencies, but now always chooses first FAT automatically after telling me FATs differ. It still does the same Free cluster summary wrong afterwards. I cannot run with -p anymore because it is now marked as read only. It also managed to corrupt my VM's disk somehow on the first attempt (yes, I'm sure I chose sda, which is mapped to a 7.4GB drive - I triple checked). Thank god for snapshots?


I'm just about out of ideas. To my inexperienced mind it looks like something in the drive's firmware set it to read only "permanently" somehow - is there any way to reset this? I don't particularly care about keeping data, considering I've reformatted it twice.

Also, fixes that keep me in Windows are better; it reduces the risk of me accidentally nuking my main hard drive.


Update 1:

I pulled apart the drive out of curiosity.

Photo of circuit board

As you can see, there are no obvious write protect switches. There is an IC on the other side, ALCOR branded labelled AU6989HL, if that matters. If there appears to be no way to fix this, I'll probably pull out the (glued down) card and put it in a card reader to check if it's the card or the controller that died.


Update 2:

I've pulled the card off, Windows detects the drive as a card reader now. The contacts on the card don't appear to be used, and there are several rows of holes on the card itself. Putting it into the card reader only detects about 30MB total, RAW. It's probably either the original drive incorrectly reporting the card as faulty (as if a real SD card's write protect was switched on) or a bad contact somewhere.

If nothing else, I have a spare 8GB Micro SD card now... as soon as I figure out how to format it as 8GB. Which does not seem to be possible (Windows, Partedmagic, dd, DBAN... nope, still 30MB). Ah well.


Update 3

I had a few more of these. The second one failed similarly (read only) today. Out of the remaining, two were detected as empty card readers/unformatted drives, depending on shaking (faulty contact?). One was detected as 1/3 full, and had an odd volume name.

H2testw results (on the last fully working one I have!):

Warning: Only 7762 of 7812 MByte tested.
The media is likely to be defective.
7.5 GByte OK (15896472 sectors)
52 KByte DATA LOST (104 sectors)
Details:0 KByte overwritten (0 sectors)
0 KByte slightly changed (< 8 bit/sector, 0 sectors)
52 KByte corrupted (104 sectors)
0 KByte aliased memory (0 sectors)
First error at offset: 0x0000000186003000
Expected: 0x0000000186003000
Found: 0x00200800c40c3061
H2testw version 1.3
Writing speed: 3.95 MByte/s
Reading speed: 14.0 MByte/s
H2testw v1.4

While this is a little worrying, evidently the drives actually do have near-8GB capacity, as verified by a tool often successfully used to detect fake flash drives. The use of a Micro SD card rather than a marked flash memory module makes it near impossible to reflash the drive, since Alcor's drive flashing tools expect the memory model as a parameter. I think I'll just throw the whole lot out.

Bob

Posted 2012-03-20T06:19:24.793

Reputation: 51 526

Question was closed 2019-08-18T16:49:20.107

It is very rare, but some USB drive have write switches. Does yours have such a switch? – soandos – 2012-03-20T08:18:12.557

@soandos No, it doesn't - I certainly hope I'd notice a switch on my drive! It's got one of those swivel caps. I just pulled it apart, and found a nice little 8GB Micro SD card stuck inside - literally glued on the circuit board. That was surprising. It's a class 2 Micro SD; the normal brand name location has some brown rectangle on the black card. If there is no solution to this, I might end up pulling the card out (irreversible, far as I can tell) to see if the card or the controller died. – Bob – 2012-03-20T08:49:32.547

many SD cards have switches as well. Could you have tripped one? – soandos – 2012-03-20T08:51:27.600

@soandos Note, Micro SD (which was inside its case until about ten minutes ago). I've only ever seen switches on full sized SD cards. I'll add a photo of the circuit board if it makes a difference. – Bob – 2012-03-20T09:00:34.310

When you say "There was nothing in the event log.", can I rely on that? Maybe nothing correlating to the event that just happened, but maybe something is logged upon mounting the device. – Der Hochstapler – 2012-03-20T09:55:28.077

1@Oliver What I was referring to was nothing logged within five minutes of running DiskPart. I've just checked, and nothing comes up when inserting the drive either. I've even made a custom view, including everything in both Windows Logs and Applications and Services Logs. Nothing happens there. Yes, I did refresh (F5), continuously. – Bob – 2012-03-20T10:04:59.877

I don't recall properly if a flash drive going read only happened to me but it might have, and that may just be one way that they can go bad. Particularly if formatting didn't help I doubt there's much you can do other than call the manufacturer or shop who would replace it, take it back if within warranty.but maybe manufacturer has a tool you can download. or may have some more insight, maybe though no idea if they would. – barlop – 2012-03-20T10:05:15.287

@barlop Unfortunately, this was a cheap generic drive from a source that does not have it under warranty (I think I see why now). This problem looks suspiciously similar to this one here, which apparently also occurred after MBR modification. I've now pulled the card, and the drive without the card does act as a card reader (according to Windows). See the edit.

– Bob – 2012-03-20T11:00:11.513

I'm totally WTFing right now. I have NEVER seen a flash drive that is an SD card soldered to a PCB. – LawrenceC – 2012-03-20T11:47:40.583

@ultrasawblade Not soldered, stuck with some sort of (weak) epoxy. It wasn't too hard to pry apart - the card probably came loose, which resulted in it being detected as read only. I'm still trying to figure out just how it worked - there's no extremely obvious point of contact, just slightly abnormal copper dots that aren't too out of place on a circuit board; they're actually flush against the board. I'm also wondering if it would be possible to convert the drive into a card reader, but that's not something for this site. – Bob – 2012-03-20T11:51:45.577

4I'd suggest you not buy any more of those. – Daniel R Hicks – 2012-09-19T01:30:23.580

Answers

21

You can try to use a tool from the chip manufacturer Alcor. You can find it via Google, the name is "AlcorMP_5T2F_6T2F_2011-11-10.02".

There, you first open LoadDriver.exe and enter your VID and PID (you can find out these values by using ChipGenius, or using Linux and typing "lsusb -v") and click install. For my stick the values were 058F, 6387.

Then you run AlcorMP.exe where your device should be listed. A click on the button left of it, and then Start does a low level format and bad block scan on your stick.

Roland

Posted 2012-03-20T06:19:24.793

Reputation: 326

3

Google's results for that exe are pretty sketchy. Is there a trustworthy source? The company is http://www.alcormicro.com/?

– endolith – 2014-09-18T18:27:21.777

You can get the updated versions here: http://www.usbdev.ru/files/alcor/alcormp

And here are some more detailed guides: http://www.techunboxed.com/2014/09/how-to-disable-write-protection-on-dell.html

– MokiTa – 2016-04-14T12:59:44.317

1Ignore the last comment by MokiTa. Never, ever execute files you can't trust. The original version from alcormicro.com is...it's up to you. Alcor has been running their business for some time. (But they don't seem to distribute it any more.) – teika kazura – 2017-02-19T08:50:25.133

The download link takes me to a dot RU domain. So f you are worried about being hacked don't go there. The old caution about clicking links and Russian domain handles. – lewis – 2017-09-19T01:41:12.490

4I am impressed. This is an updated (approximately 4 years newer) version of the tool I mentioned trying in Update 3; it did the job! Warning for others: this will wipe the drive, so try to copy off everything you can before running it (it is a firmware flash after all!). The VID and PID can be found on Windows through Device Manager => Universal Serial Bus Controllers => USB Mass Storage Device (might be a different name) => Properties => Details => Hardware Ids. Oh, and thanks! – Bob – 2012-10-04T16:29:42.430

In my case AlcorMP.exe could not detect it. Output from CheipGenius,

USB Device ID: VID = 0011 PID = 7788 Serial Number: E41A233A

Chip Vendor: Alcor Micro Chip Part-Number: SC708ANHL(FC8708ANHL)/AU6987/AU6990 - F/W E442 Flash ID code: 2C88085F - Micron MT29F128G08EFAAA - 2CE/Single Channel [TLC-8K] -> Total Capacity = 16GB

Tools on web: http://dl.mydigit.net/special/up/alcor.html

– karim – 2013-02-10T22:49:42.570

11

Personally I imagine there is a faulty contact with the card and its dud. Immediately back everything up.

I would use linux's dd utility to reset the device. The read only status is probably in the boot sector of the device and fsck and chkdsk are filesystem level checks so wouldn't do much.

Boot into you ubuntu ISO and try:

dd if=/dev/zero of=/dev/sdx bs=1M

Replace /dev/sdx with the device corresponding to your USB drive

/dev/sdx1 is the partition where as /dev/sdx is the whole drive. You'll need to make sure the partition is unmounted to achieve that. If you cannot dd the drive due to it being read only I would put it down to a hardware fault, which you might see in the dmesg out.

Phil Hannent

Posted 2012-03-20T06:19:24.793

Reputation: 1 080

1Yes, it does appear to be a faulty contact. dd did not do anything, as expected since Linux detects the card as read only - is it even possibly for a utility to bypass what the OS detects? Anyway, I'll accept this. – Bob – 2012-03-20T11:01:29.810

@Bob - I would hope its not possible for a utitlity to bypass what an OS detects as read-only/write protected otherwise we are in trouble with all those write-protected floopy drives ( I am kidding ). The point it seems like the drive is just a dud, it happens, return it. Did you buy this drive from a normal vender? Its also possible despite the micro-card saying its 8GB it could be a fake. I don't make a habit of pulling apart $15 flash devices but it is sort of strange it was built like this. – Ramhound – 2012-03-20T11:33:22.173

@Ramhound The drive itself could hold almost 8GB, verified - I installed 4 x 700MB full CD Linux distros + 3.5GB in a Knoppix DVD + 700MB Hirens + 700MB other ISO = 7GB... with a little free space. I think I'll just toss it, or keep it as a reminder to only buy flash drives from known (and more expensive) brands... either way. – Bob – 2012-03-20T11:44:43.043

@Ramhound I obviously can't add up. I had a few more of these. The second one failed similarly (read only) today. Out of the remaining, two were detected as empty card readers/unformatted drives, depending on shaking (faulty contact?). One was detected as 1/3 full, and had an odd volume name. I'm currently running H2testw on the only working one I have left. Also, despite the Micro SD card saying class 2, its writing at at about 4.2 Mbyte/s at the moment. Unfortunately, if it is fake, reflashing is difficult without a known flash module - can't find any reference to Micro SDs in flash drives – Bob – 2012-04-24T17:24:47.910

3

RMPrepUSB has a quick drive capacity test that is intended to test for 'fake' USB flash drives and tests their capacity.

This is much quicker than running H2TESTW (but not as thorough). If it passes the RMPrepUSB test then you can always run H2TESTW afterwards – if it fails the RMPrepUSB Quick Drive test then it won't pass H2TESTW and H2TESTW would take ages to test it anyway.

Steve Si

Posted 2012-03-20T06:19:24.793

Reputation: 31

Welcome to Super User, Steve! Per our [FAQ], please disclose your affiliation with tools and websites you mention. We welcome any relevant contributions, but please try not to over-excessively promote. Thanks! – slhck – 2012-12-16T15:37:05.697

2

There are some sources, which contains very high quality information about the topic. Unfortunately, it is on russian, but google translate compares them well.

http://www.usbdev.ru/articles/detect_controller/

http://www.usbdev.ru/files/alcor/

It seems, other people had already a lot of problem with these alcor chips.

peterh - Reinstate Monica

Posted 2012-03-20T06:19:24.793

Reputation: 2 043

1

Read-only can happen when drive returns invalid data to commands such as SCSI MODE SENSE. Could be caused by corrupted firmware or flash. There's really no fix.

Brian

Posted 2012-03-20T06:19:24.793

Reputation: 11

1

You can fix this problem. Type "regedit" in cmd prompt

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies] "WriteProtect" Change value = 0 then save and restart the system and check it...

Manikandan A R

Posted 2012-03-20T06:19:24.793

Reputation: 11

1

I had this with a USB key I lent to someone to use in their Mac. All files readonly and the disk itself marked as Readonly in Computer Management. I plugged it into a different Mac had a look in Finder and removed it (without ejecting it first I admit). When I plugged it back into my Windows 7 machine it was working fine again. Simple solution, but I realise only any help if you have a Mac nearby

TimSmith-Aardwolf

Posted 2012-03-20T06:19:24.793

Reputation: 141

this also happened to me after plugging into a MacBook Pro – endolith – 2014-09-10T20:48:30.417

0

I had the same problem and then I found this program.

WBFS Manager Link: http://wbfsmanager.codeplex.com

This program will format a USB flash to work on the Wii. Download to your PC, install, run, select your flash drive that you are having problems with.

Then format it under this program, exit WBFS Manager, Start, and run Computer Management. Then select Disk Management from the left side of the screen, click on your flash drive and format under windows and the flash drive is working again.

Sal

Posted 2012-03-20T06:19:24.793

Reputation: 1

1I had this issue with 2 different thumb drives after using Yumi. I followed this. BUT I had to NOT do a quick format. I had to do a full non-quick format. I also had to wait 5 minutes after removing the thumb drive before plugging it back in. They are both the same thumb drive (same brand that is). I'm still unsure why this is happening but this seems to have worked. – None – 2013-07-02T15:48:09.630

0

I had the same issue with the "current read-only state: yes". I was trying to figure out why I was not able to delete photos from my SD memory card when I right click the folder. There was no DELETE listed in the drop down window.

I uninstalled the driver for my SD memory card reader and then reinstalled the driver. That fixed my issue.

The delete option is now listed in the drop down window, when I right click on the picture folder. After reinstalling the driver, I ran a diskpart. The current read-only state is now no. I have a fairly new computer with the Windows 8 operating system.

My guess is when my computer done an update, that's when the my issue started. I remember being able to delete photos from my SD memory cards before, when I first got the computer.

SDavidC44

Posted 2012-03-20T06:19:24.793

Reputation: 1

-1

Try these steps to change it -

  1. First you insert pen drive on the port of your computer:
  2. Go to disk management.
  3. Where you see disk 1 removable disk.
  4. Right click on this disk and make a drive for windows.
  5. You can then format it .It easily formats.

now you use this pen drive normally.

raj goswami

Posted 2012-03-20T06:19:24.793

Reputation: 1