1

I would like to completely wipe out the USB key and format it in fat32, but I am having troubles...

  1. I needed Windows 7, so in Ubuntu 14.04 I installed WinUSB program and installed Windows iso image on my USB Key, then I installed Windows on one of my computers.
  2. Now I don't need this Windows boot USB key anymore and I would like to use this USB key for my data.
  3. I plugged in USB key into Ubuntu 14.04 and started GParted. Selected my USB key so /dev/sdb, right mouse click and selected Unmount and then Delete. Clicked on check box from toolbar to accept changes. I created new partition with fat32 file system and accepted the changes. Back to my file manager and to my surprise I can still!!! see Windows files on my USB key. Very strange. I am sure this is the only USB key in my computer. Other device /dev/sda is my hardisk.
  4. I Unplugged the USB Key and plug it back. In Nautilus file manager I can see like there are two USB volumes in my computer, very strange.
  5. It looks to me like on USB key is some hidden partition or something like that,that GParted can't see.

Please see print-screen I made in Ubuntu:

enter image description here

Any idea how to completely wipe out a USB Key? Thanks

1
  • why dont you use Disks program from dash and delete both the partitions and format it again in FAT32 Dec 4, 2014 at 8:35

1 Answer 1

1

You can do this by zeroing the entire flash drive, using dd

1) Run disks to get the device identifier, for example '/dev/sdg', then close disks.

2) From a terminal run this command

sudo dd if=/dev/zero of=/dev/sdg

This will write zeros to the entire flash drive, clearing it completely. Be very careful to use the correct device identifier. If you use the wrong one you will erase one of your hard disks. This is a fate you would not wish on your enemies.

This will take quite a long time to run. You can check on the progress as follows:

Open another terminal and type the following

2.1) ps ax | grep /dev/zero

The first number is the pid

2.2) sudo kill -USR1 pid

The progress will be displayed in the first terminal.

3) When complete, run disks again, select the zeroed flash drive and format a fat partition.

Not the answer you're looking for? Browse other questions tagged or ask your own question.