USB Flash stick mounts and shows files but changes do not persist and unable to format / partition

I have a (relatively new) 32Gb USB Flash storage stick. At some point, I did something to it which caused it to completely break. I can’t remember exactly what happened, but it was possibly something along the lines of pulling it out while it was writing some large file (3-4Gb).

Ever since, the USB stick has become unusable. When I plug it in, it seems to mount normally and my file browser (Thunar) pops up showing the files. However, if I try to interact with the drive (e.g. try to delete or rename anything), this has no permanent effect; if I try to create a new file, unmount the drive, or format it, it just hangs for a while, until the disk becomes inaccessible (see below). (admittedly, formatting fails because the OS tries to unmount the drive first).

When I first plug the stick in, Disks shows it listed as having a single partition of type W95 FAT32 (LBA), with MBR partitioning, identified as device /dev/sda1, and mounted normally at /media/<username>/<drivename>.

After any operation on the drive, the drive seems to become inaccessible. If the Thunar window has been left open during this time, you will notice files seem to change names to the old dos format i.e. 8 characters max, file-extensions in capitals, and tilde identifiers as suffixes for “long” names), or disappear entirely. At this point, Disks then reports it as partition type “0x0c” with unknown partitioning, but somehow still reported as mounted in the same location as before.

Any attempts to re-partition fail with cryptic messages, e.g.

  • Error deleting partition /dev/sda1: Failed to assign the new context to disk ‘/dev/sda’: No such device or address (udisks-error-quark, 0).

Finally, attempting to “Safely Remove” from the thunar side-pane starts saying “writing data to Flash USB Disk; device should not be unplugged” for some time, then fails with:

  • Error ejecting /dev/sda: Command-line eject '/dev/sda' exited with non-zero exit status 1: eject: cannot open /dev/sda: No such device or address.

I have also tried doing writing an .iso file to it using dd, but without success. (dd reports having performed an operation with no apparent error, but almost instantaneously, which seems not plausible when writing an .iso file).

Does anyone have a clear idea what has gone wrong with this disk and if it’s still salvageable?

I use Linux Mint 22 XFCE edition on a Dell laptop. Haven’t tried on Windows but I doubt it matters to the above.