When I tried reflashing the drive, Etcher said it was locked, and I could not format the drive in Windows. The error message says it's write-protected. I've tried Ubuntu as well, but that doesn't work either. Any ideas?
As you mentioned, your USB drive became write-protected after flashing your operating system, so you cannot write or change the data on the USB drive until you remove the write protection. This article will provide a complete guide to removing the write protection. Before attempting, unplug the write-protected USB drive and connect it to another PC to check if it's writable. If not, you can try the following two practical solutions. In response to your problem, the first solution I recommend is to use Qiling Disk Master Free. It's valuable and safe software that can disable the write protection with the write protection removal tool.
Here is how to do so:
Step 1. Download and install Qiling Disk Master, tap the "Disk management" section.
Step 2. Right-click your write-protected USB, and select Advanced -> Remove disk readonly.
As you can see, if you use the Qiling Disk Master, there are just two steps that you can take to remove the write protection on your USB drive. We also provide another usual method: remove write protection on USB drives using the Registry editor.
Follow the specific steps to remove the write protection:
Step 1. Type "Regedit" in the search box, and choose "Regedit.exe."
Navigate to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Step 2. Double-click on "Write Protect," change the value data to "0," and hit "OK."
Step 3. Close "Regedit" and restart your computer.
The second method is complex and not suitable for the computer beginner, so use Qiling Disk Master to save your time and energy. If you need to format the USB drive after it is unlocked, find more information by clicking the following link.
Read More: How to Format Write Protected USB/Pen Drive