Sometimes, shit just goes wrong, and you end up with a half-flashed drive that is totally unusable by your operating system. Some common graphical tools might even refuse to get it back to a normal state.
To solve these kinds of problems, we've collected a list of fail-proof methods to completely erase your drive in major operating systems.
Windows
In Windows, we'll use diskpart, a command line utility tool that comes pre-installed in all modern Windows versions.
- Open
cmd.exefrom either the list of all installed applications, or from the "Run..." dialog usually accessible by pressing Ctrl+X. - Type
diskpart.exeand press "Enter". You'll be asked to provide administrator permissions, and a new prompt window will appear. The following commands should be run in the new window. - Run
list diskto list the available drives. Take note of the number id that identifies the drive you want to clean. - Run
select disk N, whereNcorresponds to the id from the previous step. - Run
clean. This command will completely clean your drive by erasing any existent filesystem. - Run
create partition primary. This command will create a new partition. - Run
active. This command will active the partition. - Run
list partition. This command will show available partition. - Run
select partition N, whereNcorresponds to the id of the newly available partition. - Run
format override quick. This command will format the partition. You can choose a specific formatting by addingFS=xxwherexxcould beNTFS or FAT or FAT32afterformat. Example :format FS=NTFS override quick - Run
exitto quit diskpart.
OS X
Run the following command in Terminal.app, replacing N by the corresponding disk number, which you can find by running diskutil list:
diskutil eraseDisk FAT32 UNTITLED MBRFormat /dev/diskN
GNU/Linux
Make sure the drive is unmounted (umount /dev/xxx), and run the following command as root, replacing xxx by your actual device path:
dd if=/dev/zero of=/dev/xxx bs=512 count=1 conv=notrunc

