My USB stick is stuck on Read-only and I can't change it back or delete any files on it, any idea how to reformat it?
I have a Read-only file system USB, and I want to wipe it and reformat it.
- Edited
you can't format it because you don't have permission to format it.
I could write a book on failing this task, I don't know if its possible to do. The internets is page after page of people failing and succeeding.
*diskpart.exe in windows is supposed to remove a read only flag from a usb. there are tutorials. I believe they set the flag in my case.
*https://unix.stackexchange.com/questions/203672/usb-flash-drive-is-read-only-under-gnome-on-debian is a success story forcing mount
while checking fdisk
--this assumes you mounted it at /dev/sdx1/
so change the name of the drive to what fdisk believes it is. In changing name, you change ownership to this article. Crazy?
*this post (https://discuss.getsol.us/d/142-read-only-file-system/6) in forum is solved using chown
which is an old trick but most important read the link in that post---it furnishes some chown
commands and gives context to executing the task of changing ownership.
I was too linux-green to make any of this work. All I had was Solus and another dead jump drive (permissions). But it was expensive enough (usb) to put hours into rescuing it, but never could.
edit: a 'hail mary' that I never tried but wish I did was to burn some distro's live .iso onto it. If the distro succeeded though it would seem easier to get your permissions back.
What about GParted? You can format sudo mkfs.vfat /dev/sdx
x - your pendrive, You'll find out after the command sudo fdisk -l
- Edited
Ummm if the usb drive is at its life end or failed they lock to read only so data is preserved. Or its locked to read only would have to clear the read only windows had utils to set different modes but I havent done it in linux yet. Or if it was wrote to its life end its done withand locked to read only. you usually see writes start to get slow before that happens. Sandisk had a problem like your describing was no cure for think they replaced them but that was awhile back i think (just info from having it happen wrote to it to much,this is just for thumb drives)
- Edited
Axios Ummm if the usb drive is at its life end or failed they lock to read only so data is preserved...Or if it was wrote to its life end its done withand locked to read only.....you usually see writes start to get slow before that happens. Unrecoverable and locked..
writing weird (not writing, slow writing) is definitely a symptom of a dying thumb drive and the main reason I finally got solus off a thumb and on a hard drive. but....the read only thing has never happened to me ever for a portable drive at end of life. Maybe I didn't take things that far? I don't know. Your usb self-preservation theory is very interesting, though.
Axios Sandisk had a problem like your describing was no cure
My Sans Disk--pristine, expensive, big, unusable--probably was one of those fubard right out of the factory at that time but I used it a handful of times and when I pulled it out of Windows one day that was all she wrote. Fat lady sang.
edit: @Edwin0961 this is kicking up some past dust. is your situatuion still the same?
- Edited
brent That was the problem with sandisk windows something with ntfs and fat or fat32 screwed them up.
Sorry was not trying lose focus was posting that to try help edwin0961 Maybe every brand dont have that preservation feature. Was just thinking you guys trying these commands unmounted right?
- Edited
Axios yep...and those ba*****s would not offer a refund-----instead they offered a "key" you could download from skeevy-appearing third parties that was supposed to 'unlock' the faulty drive, only after you offered purchase proof and email...none of the downloaded "keys" ever worked to unlock the drive....that was the day, or close to it, I went linux and never came back. I agree with you the failure began with that operating system.
mods: I end my digression here: I'm sorry I veered the thread.
If you can access a windows pc / vm I'd be curious to know if the low level format tool from HDDGuru can't format your drives. Just make sure you have a read of the info and double / triple check you have the correct drive selected. Also make sure you back up anything you might want in the future, as the info page will tell you, data recovery is not possible after using this tool.
Edwin0961 Everybody swears it fixed there thumb drive but its winders.
https://rmprepusb.com/tutorials/054-how-to-fix-write-protected-read-only-drives-and-sd-cards/
Read so many failures on this subject this one had some successes. (info)