I had this one old flash card that could neither be mounted, nor be formatted, trying it both on Windows and Linux, including GParted, Disks and a few other applications in the battle. An error message I was getting every time when trying to format it was this:
Error synchronizing after initial wipe: Timed out waiting for object (udisks-error-quark, 0)
At the same time the dongle was still alive, as I could see a diode blinking upon plugging it to the computer, and lsusb
listed it as a valid USB device.
Digging around I ended up trying the following command, which in effect set 0 to every bit on the flash memory:
sudo dd if=/dev/zero of=/dev/sdc
/dev/sdc
is the device, corresponding to the flash memory. One of the places it could be seen is in GParted. There are better ways but I can’t be bothered to check for them right now.
The process took more than an hour for a 8Gb of space, but after that I was able to format it and start using it as if nothing happened.