This is an old flash disk that I have not used in a while. It was a small drive I was planning to use for TinyCore Linux. I plug it in, and it does not show up in KDE Partition Manager.
I query lsblk, lsusb and usb-devices in bash (Ubuntu 20.04.2) twice each , once with and once without it plugged in. I manage to find that it mounts at /dev/sdc , so i proceed to do a sudo fdisk /dev/sdc , but get fdisk: cannot open /dev/sdc: Read-only file system .
Alright, I do sudo hdparm -r0 /dev/sdc and get :
/dev/sdc:
setting readonly to 0 (off)
readonly = 0 (off)
Which appears to state that I've been successful in changing the readonly variable to False ?
Also, KDE Partition Manager now sees it but says No valid partition table was found on this device. But any attempts at formatting result in immediate There were errors while applying operations. Aborted. with the dialog box below displaying :
Create a new partition table (type: msdos) on ‘/dev/sdc’
Job: Create new partition table on device ‘/dev/sdc’
Command: sfdisk /dev/sdc
Create new partition table on device ‘/dev/sdc’: Error
Create a new partition table (type: msdos) on ‘/dev/sdc’: Error
Calling fdisk on /dev/sdc still gives the same read-only error message. Sigh.
I thus conclude something has gone wrong with the drive , perhaps it's days of being written to are over. Okay, so does it have any data on it , since it can be read ?
I run intdump on it (hexdump should yield similar results) and I get an endless stream of 0s until I decide to ^C and kill the program.
Any idea what could have happened and if there's anything else that can be tried to recover or revive it ? Or is it dead, as I presumed ?
EDIT :
On Ubuntu , just as on macOS and Windows 7 machines that I tried on, this 2 Gib drive seems to show up as a 7.5 Gib drive. Is this normal or does it indicate some low-level error that can be undone to revive this disk ?
EDIT 2:
I attempted reformatting/erasing on Windows 7 SP1 as well as macOS 11.1 's DiskUtility. Of course, it failed, with Windows also saying it was "read-only".
EDIT 3:
Sadly , @Tetsujin suggested and perhaps got this question closed because apparently they found it similar to 1125282 . Untrue. A sincere reading of the question in full is enough to indicate that the reality is quite to the contrary. Here is how :
I have tried the usual methods and the hypothesis presented in those answers and that does not check out here. "inserting the drive into another computer" does not work, as mentioned in edits 1 & 2. "This behavior is typical of flash drive controllers when they detect ... too many bad blocks" and "any data on the drive is still accessible" - well, all bytes are 0 , as scanning the device reveals, and "overriding this" does nothing. "Ensure ... "Write-Protect Switch" is not locked" There is no such thing. "low-level format tools may help" - nope.