Sign in with
Sign up | Sign in
Your question
Solved

Removing write-protection on bootable flash drive

Last response: in Storage
Share
December 6, 2013 7:24:04 AM


I used an .iso to make my Kingston DT bootable, but in doing so it also made it write-protected. I used it satisfactorily in that state for several months, but when I wanted to reformat it with a new .iso, unfortunately all my attempts to do this failed.

I more or less wrote that Kingston off as an unfortunate hardware failure, and made a new NX216 8GB stick bootable with my next .iso. Again it worked OK until I came to the point where I wanted to change to a new .iso. Reformatting failed on this one too, which is when I realised my previous Kingston failure must be due to a similar symptom.

Neither my Kingston nor my NX216 have usable partitions and attempts to write a new MBR fail which I guess is because they are being thwarted by write protection. Have tried low-level formatting from command prompt, and regedit change to set StorageDevicePolicies to "0".

Any other suggestions?

Best solution

a b G Storage
December 6, 2013 8:34:32 AM

Check the security tab in properties to ensure "everyone" has "full control"
Share
December 6, 2013 11:34:12 AM

OK, thanks for the suggestion ldewitt, but that doesn't seem to be it. In Advanced Sharing -> Permissions I've already got Everyone with Full Control ticked.
m
0
l
Related resources
December 6, 2013 11:59:33 PM

Diskpart sounded like a credible suggestion, Dereck, so thanks for that, but sorry to say it hasn't got me much further. On both my flashdrives it appeared to clear my readonly attribute successfully, but they are both still saying Windows is unable to complete my quick format requests.

As for trying attributes volume clear readonly, I get a Virtual Disk Service Error saying the operation is not supported on removable media.

My Kingston is showing FAT32 and healthy, while my NX216 is showing RAW and healthy.

I'll persevere with some of the other software I've been trying such as TestDisk, BOOTICE, HDD Low Level Format Tool, EasUS Partition Master, and see if Diskpart's alleged successful clearing of my discs has made any difference.
m
0
l
December 7, 2013 9:05:28 PM

Mmm... yes, that's not a bad article, Yoggi, but as you suggest, I find I've pretty much tried all those tricks. Thanks anyway.

The difference with my two write-protected flashes, which nothing I've found on websearches so far seems to address, is that I burned them both from .iso myself, which presumably replaced their boot files and deliberately made them read-only. Later after using them successfully for quite a while like that, I tried to reformat them. This somehow removed all my .iso originated main partition
body content in them so they are both now empty, but it left them unwriteable. Whether they've got something that makes them unwriteable in their boot sector, or whether there's something even deeper down inside them causing that, I don't know.

I don't suppose I'm the first person in the world to have tried using flashdrives instead of CDs or DVDs to burn bootable programmes on to, so I'd like to hear from anyone who's done that and then gone on later to try and reformat them like I have.

Basic question: Is it possible to recycle flashdrives and burn them again with another .iso after they've already been used once that way?? .
m
0
l
a c 235 G Storage
December 8, 2013 6:55:51 AM

I would try Kingston Tech Support next, if this doesn't give you the answer.

Yogi
m
0
l
December 8, 2013 6:04:55 PM

OK, I'll try this, but it's too early to call it a "solution" (which someone has done) just now because we've no idea whether it will be successful, and in any case at best it could only be half a solution because I have two stuck flashdrives and only one of them is a Kingston. It is misleading to have marked this question as "solved" right now. I'm still hoping I might get a response to my basic question above [repeat] Is it possible to recycle flashdrives and burn them again with another .iso after they've already been used once that way?? .[/repeat]
m
0
l
a c 536 G Storage
December 8, 2013 6:33:10 PM

SleepyzzJohn said:
I'm still hoping I might get a response to my basic question above [repeat] Is it possible to recycle flashdrives and burn them again with another .iso after they've already been used once that way?? .[/repeat]


Yes, I do it often (with a HP USB flashdrive).
That link that YOGI gave listing the 7 different ways to fix USB drives works 99% of the time.
It's possible that your problems are because of the software you used to burn the .iso files to your drives. Try using another one next time.




m
0
l
December 8, 2013 9:28:13 PM

Good to know recycling is possible and you've been doing it, Dereck. That's significant news. I've been burning from Linux's built-in "Make Startup Disk" because I'm trying to move away from Windows altogether. I suppose it's possible this sw might be responsible, but I'm afraid I don't feel like risking a "next time" and possibly ruining a third flash until I've got to the bottom of what;'s happened to my first two.
m
0
l
December 24, 2013 1:45:39 AM

Hi

If you find write-protected in flash drive , the way remove is to copy the registry entry to a note pad and save pendrive.reg .
Remove the pen drive and click this file , insert and pen drive and read/write


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"Writeprotect"=dword:00000000



m
0
l
December 24, 2013 6:08:52 AM

Hi Tkk. Thanks for the suggestion, but it's one I'd already tried because it was included in the URL Yogi posted here on 7 Dec., Even with "Writeprotect"=dword:00000000 set in registry, the flashdrive still shows writeprotected when I try to make changes to it.

I'm still stuck on this problem though, so any further suggestions would be welcome.
m
0
l
December 24, 2013 8:18:43 PM

Thanks Yogi, that one certainly looks very promising. I'll give it a try and report back here asap.

Kingston Technical Support's 2nd reply was a disappointingly standard set of response sentences taken from their call-centre phrase book, but I've gone back with a request for more specialised technical dialogue and now await their 3rd reply.

I've had encouraging feedback from other correspondents besides Dereck here, saying they have successfully reformatted flash drives they've previously made bootable, but using different brands from mine, so I'm not sure if there's a proprietary "some can" and "some can't" issue here or not.
m
0
l
a c 536 G Storage
December 24, 2013 8:47:07 PM

SleepyzzJohn said:
so I'm not sure if there's a proprietary "some can" and "some can't" issue here or not.


Yeah, unfortunately that's what it's looking like to me.

m
0
l
December 30, 2013 7:28:52 AM

I've now tried mUsbFixer from that softpedia URL. Their description certainly sounds great, and it looks to be ridiculously simple, but doesn't work at all because it won't recognise either of my flashes at all. I'm supposed to select the drive to fix from a dropdown box, but nothing ever shows in that box. Even trying on it another known good flashdrive, nothing shows. I've e-mailed the support in India to see if they have any suggestions, but on the face of it, the programme appears to be flawed.

I've also come to the end of the road with KIngston Support. I've been fobbed off with:
Quote:
We sincerely apologize that Kingston DataTraveler 101 does not officially support boot feature. We neither provide tool/updater nor provide other work around for your issue. Besides, it is possible "write-protection" mean the drive lucks itself since the original structure was affected/attacked from unknown reason.

If any inconvenience may have caused, we sincerely apologize.


Running out of ideas again now


m
0
l
April 29, 2014 8:25:29 AM

Have you tried just copying a string of zeroes over the raw block device?

Most OS tools presume that the drive has been formatted with FAT32. Windows in particular can be a bit funny about drives with a partition table on them.

e.g. from Linux

# Where /dev/sdc is your USB thumb... make sure by using fdisk to list your block devices or reading the output of dmesg after you insert it
sudo fdisk -l
# not /dev/sdc1 or any other numbered partition - the root block device
dd if=/dev/zero of=/dev/sdc

A few seconds of the drive light flashing is usually enough for this to work - you can quit the command with ctrl-C and remove / reinsert the drive and format it.
m
0
l
April 30, 2014 9:02:14 AM

Many thanks to awilkins for this suggestion. Yes I had previously tried just copying a string of zeroes over the raw device using BOOTICE but found I could only write them in sectors 48 upwards. I couldn't write in sectors 0 to 47. I could see sectors 8 to 47 had largely FF in them.

So I've been trying your suggested dd if=/dev/zero of=/dev/sdb and seem to be making some limited progress, but the situation is rather complicated and confused because I now have three failed devices, each exhibiting different failure symptoms. I'm still working on them.

On my 8GB Kingston DT 101 this first step resulted in its disk identifier changing from its previous value to 0x00000000 and it saying it doesn't have a valid partition any more.

As a 2nd step, I tried with "Disk" to format MBR and FAT32. It seemed to go through the motions and changed its disk identifier from 0x00000000 to a new value, but at the end said it didn't have a valid partition table

As a 3rd step I tried mkdosfs -F 32 -I /dev/sdb which worked because when I removed and replugged the device in, it was recognised, showing 358MB used and 7.6GB free. I was able to save three small text files, safely remove the drive, reinsert it, and find the three small text files still there. This looked good, but unfortunately it didn't last.

When I tried to safely remove the drive again, I couldn't because it went into continuous flashing mode and never stopped. When I pulled it out and reinserted it again, it was back to telling me it didn't have a valid partition again. A couple more tries with mkdosfs -F 32 -I /dev/sdxx got it working again but now it was showing 817.6MB used and 7.2MB free. Something had been eating up its free space.

At this point I took it over to Windows and tried it there. Windows said it had 6.67GB free out of 7.44GB, and when I tried to open it, I found an unrecognisable folder with an impossible creation date and a couple of large unrecognisable files that couldn't be deleted. Maybe the FAT formatting I'd done on Linux was being misinterpreted by Windows so I thought I'd try a Windows format. Windows formatting failed and said the device was write protected.

Next step was to have a look using TestDisk. TestDisk told me no partition was bootable. Further examination though, revealed a couple of Linux partitions thus:
Start End Size in sectors
1 * Linux 157 14 50 351 151 56 3125248
Linux 157 177 21 352 59 27 3125248

I can only assume that these Linux partitions were the original bootable ones I burned on to the drive from Linux .iso downloads a couple of years ago and which I've never succeeded in removing by reformatting.

Experimentally I tried to rewrite the first of these as a Primary partition, but TestDisk came back with a "Write error", indicating that it's still seeing the device as write protected.

I remain confused why Windows and TestDisk are still seeing this drive as write-protected when I've been able to save small text files on it from Linux. I think it must be something to do with boot sector incompatibilities, and I'd like to know how to write a completely new boot sector on this device which will be recognised by both Linux and Windows and which will clear the write protection I'm still seeing when I use Windows. Earlier this year I checked regedit HKEY_LOCAL_MACHINE\System\CurrentControlSet/control\StorageDevicePolicies and verified writeprotect was set to 0.

Thanks for bearing with this long story, which is only about one of my three failed devices. Maybe I'll work on the other two and post again later.
m
0
l
May 7, 2014 10:19:35 PM

awilkins said:
Have you tried just copying a string of zeroes over the raw block device?

Most OS tools presume that the drive has been formatted with FAT32. Windows in particular can be a bit funny about drives with a partition table on them.

e.g. from Linux

# Where /dev/sdc is your USB thumb... make sure by using fdisk to list your block devices or reading the output of dmesg after you insert it
sudo fdisk -l
# not /dev/sdc1 or any other numbered partition - the root block device
dd if=/dev/zero of=/dev/sdc

A few seconds of the drive light flashing is usually enough for this to work - you can quit the command with ctrl-C and remove / reinsert the drive and format it.


I have the exact same problem, but i don't know what to do exactly with the commands you gave. Can you please give me more detailed directions. I assume from the use of sudo that this must be done from linux?
m
0
l
May 8, 2014 7:56:13 AM

Hello tortis97. If you read through my April 30 saga right to the end, you will see that awilkins suggestions haven't actually worked for me, although it did appear at first that they were doing so. I'm afraid that you could go to a lot of trouble setting up and learning about a linux system only to find like me that the string of zeros awilkins' command writes on your flash drive doesn't fix it in the end.

Do you already have access to a linux system, or are you thinking of downloading one and burning a live CD ? If you can explain exactly where you are down this road just now, maybe I could guide you to the next step.

Right now, I've placed the problem of my three different flashes becoming unusable on hold pending a refill of personal time and motivation. I wish I could offer you a good working solution, but at the moment I'm sorry I can't.
m
0
l
May 9, 2014 10:29:57 AM

No, that sevenforums solution is for Diskpart which was already mentioned on this thread on 6 Dec 2013 and I'm afraid it didn't work.
m
0
l
June 1, 2014 9:18:42 PM

Not a solution, just some thoughts...

USB flash drives use the USB mass storage device class (http://en.wikipedia.org/wiki/USB_mass-storage_device_cl...). This is a higher level protocol than raw device access. Apparently, the standard allows for a number of different protocols but in practice, USB flash drives only use SCSI commands and support a subset of the commands in the list at http://en.wikipedia.org/wiki/SCSI_command.

So, the host does not "directly" access the flash memory but sends SCSI commands requesting operations to be performed. How the flash drive responds to those commands depends on its firmware. I think the host checks if the device is read-only by issuing a MODE SENSE SCSI command and checking if the device returns a MODE_DSP_WRITE_PROTECT bit.

So it seems like the question is, what causes the SCSI controller in the flash drive to determine that the flash drive has been write protected. If the controller reads that information from a private storage area in flash, then that information must have been set either in response to an actual SCSI command to write protect the drive, or by a bug in the controller allowing you to overwrite the private information with user data. If it's the first, then it should be possible to send another SCSI command to unprotect the drive and if it's the latter, then the bug has basically locked you out of the drive. Then, I think the only solution would be if the controller has some "back door" through which lower level commands can be issued, maybe through a utility made by the manufacturer, to update the contents of the private storage.
m
0
l
June 2, 2014 5:08:59 AM

Roger Dahl wrote: Not a solution, just some thoughts...

Hmmm...no, not an answer, but worth thinking about nevertheless, so thanks for your welcome post.

Meanwhile, I've had two more drives go write-protected on me, making a total of four so far. I originally attributed the cause to be somehow associated with my having "burned" them as bootable from an .iso, which is what I did with the first two, but that theory is now losing credibility since the other two have gone write-protected more recently without any .iso or "burning". Four is just too many to attribute to bad luck, so I feel there has to be some other common factor, but I still don't know what!!

My 4th one to go write-protected (a Kingston 8GB data traveller) has actually responded OK to formatting treatment with mUSB Fixer and I've got it back and working again, but no such luck with my other three.

So like Roger Dahl, I don't have a solution, but thought it worth sharing my latest experiences in case they spark any new ideas with the readers here. Any other success or failure stories, anyone?

m
0
l
June 2, 2014 7:52:14 AM

With 4 broken ones, maybe it's possible to find some statistical correlations. Could you list the brand names, models, purchase year, storage size, usage scenario (frequency of write and read operations, filesystems used, applications used) and which hosts and operating systems the flash drives were used with for both the ones that have become write protected and any others you own?
m
0
l
August 22, 2014 11:35:59 AM

What worked for me:
1. Device manager > Disk drives > properties of the borked USB disk > policies > change to "better performance"

2. Computer management > assign drive letter, format and done!

I hope this helps.

The drive is SanDisk Cruzer 16GB.

Edit:

It actually reverted to the original read only state after formatting it again to exFAT fs. Did it again (simple volume in computer management, format to FAT32) and now formatted again to exFAT fs but this time it wasn't the quick format. Did some read/write operations with the drive and it appears to be working fine.

I'll post again if something changes.
m
0
l
August 24, 2014 2:34:57 AM

Trigg3rHippie said:
What worked for me:
1. Device manager > Disk drives > properties of the borked USB disk > policies > change to "better performance"

2. Computer management > assign drive letter, format and done!

I hope this helps.

The drive is SanDisk Cruzer 16GB.

Edit:

It actually reverted to the original read only state after formatting it again to exFAT fs. Did it again (simple volume in computer management, format to FAT32) and now formatted again to exFAT fs but this time it wasn't the quick format. Did some read/write operations with the drive and it appears to be working fine.

I'll post again if something changes.

Thanks Trigg3rHippie. That looks like an interesting new alternative to try. Just to clarify, is that on a Windows platform? If so which one were you using? I have to ask because I usually work in Linux Ubuntu so I'm not too familiar with Windows, but I could get access and give it a try if I knew which version it is.

m
0
l
August 24, 2014 6:25:43 AM

SleepyzzJohn said:
Trigg3rHippie said:
What worked for me:
1. Device manager > Disk drives > properties of the borked USB disk > policies > change to "better performance"

2. Computer management > assign drive letter, format and done!

I hope this helps.

The drive is SanDisk Cruzer 16GB.

Edit:

It actually reverted to the original read only state after formatting it again to exFAT fs. Did it again (simple volume in computer management, format to FAT32) and now formatted again to exFAT fs but this time it wasn't the quick format. Did some read/write operations with the drive and it appears to be working fine.

I'll post again if something changes.

Thanks Trigg3rHippie. That looks like an interesting new alternative to try. Just to clarify, is that on a Windows platform? If so which one were you using? I have to ask because I usually work in Linux Ubuntu so I'm not too familiar with Windows, but I could get access and give it a try if I knew which version it is.



Yes, I'm running Windows 7 Pro x64 (6.1.7601 SP 1)
m
0
l
!