Recovering USB drive with Ubuntu
After I wrote an Linux .ISO with Unetbootin in my 4GB USB drive, the USB was no more writable. I tried formatting it with GParted (and it didn't even recognize the drive), tried with Windows and it just wouldn't format.
I thought the USB was broken and ready to go to the recycle bin but then I came across this small hint.
In terminal, run:
sudo blkid
Blkid is an utility that returns attributes of your drivers. And blkid returned, among other things, this one line:
/dev/sdb1: LABEL="Ubuntu 12.10 amd64" TYPE="iso9660"
Ops, type iso9660? Really, I don't know what is that but surely the reason for this issue. And the solution is really simple:
WARNING! ATENCIÓN! ATENÇÃO! ACHTUNG!
This will clean up your drive and if you point to the wrong drive, you will be very sorry.
sudo dd if=/dev/zero of=/dev/sdb1
After that command finishes, you'll be able to format your drive and have it working back. :)