0

I have a recovery USB drive from the Computer Manufacturer that I used to reinstall windows. I am done using the windows files on it. It is 16GB and has relatively fast read/write speeds so I would like to reuse it. However, when I try to write anything to the drive, windows explorer says that it is read-only. I tried dozens of suggestions and even tried to format it on my linux machine. Nothing has worked, and every method returns and error that the media is write-protected. Here are the methods I have tried:

  • Using hdparm, gparted on linux
  • Using diskpart on windows
  • Using three different third party software tools

Does anybody know how I can brute force wipe and remove write protection from this USB? Preferably the solution will work on linux or windows. I hope it is possible as this is a really good USB drive.

alanw
  • 1

2 Answers2

0

Flash memory chips are divided into 528-byte pages which may only be written if blank, which are grouped into chunks of 64 to 1024 (or possibly more); erasing any page requires erasing all of the pages in the same chunk.

Flash drives that are intended to allow 512-byte sectors to be written and rewritten in arbitrary sequence need to use rather complicated mapping and wear-leveling algorithms to accommodate this. Writing a sector won't immediately erase the old data, but will instead write the new data in some other location that is known to be blank, and cause the old data to be marked as obsolete. If the supply of blank pages gets too low, the system will look for blocks whose contents are mostly obsolete, copy any live pages from that block into some of the remaining blank space (marking each copied block as obsolete), and then erase the block once all of the pages in it are obsolete.

All of this extra mapping logic increases the complexity of the controller, and further reduces the fraction of the flash that is usable for storing useful data. By contrast, if a drive is designed for read-only access to a volume that will be written once during mastering and will never be written again, it can use a simpler controller and won't need to dedicate a substantial chunk of the flash (often 10% or so) to a relocation tables and slack space.

I don't know that any particular vendors ship software on purpose-designed "read-only" USB drives, but it would certainly make sense for them to do so. While doing so would eliminate the possibility that the drive associated with a particular machine might be repurposed once the machine is no longer needed, it would make the drive more suitable for its intended purposes as a "known good" recovery medium.

supercat
  • 1,799
-1

Let's see how good I'm at guessing...

I'm guessing without having seen it that it has some fancy metal casing (which made you like it in the first place..) but under that good looking cover there's usually a tiny physical switch - much like most SD cards have - which enables/disables read/write protection and unless you turn that switch off (for which you will most likely need to break the casing and ruin the entire thing in the process) you're much better off buying a new one for 5-10 bucks. So how did I do?

Nathan
  • 1
  • I opened up the USB drive and I can't see a switch. I guess it is better to get a new one :) – alanw Apr 28 '20 at 17:16