1

I have made a bootable USB drive with Ubuntu installer and now I can't delete Ubuntu from it. I tried to use GParted and erased the partition table, made a new ms-dos partition table and formatted the drive as FAT32. Now the name of the drive is still Ubuntu 13.04 amd64 and a couple of files and folders from ubuntu installer are still there(eg: wubi.exe, boot and others). I can't delete them because it is read-only. I also tried the following:
open terminal

sudo fdisk /dev/sdb
command: n
partition type: p
partition number: 1
Now, the minimum value of the first sector is 2048 instead of 62 (the drive has 62 sectors /track)
Tried with 2048 as first and all remained the same as before.
I need urgent help, any command or thing that might help. Preferably not stuff like Gutmann wipe :)

Mihai Bujanca
  • 374
  • 3
  • 5
  • 15

3 Answers3

4

Note: make sure that you have no needed data on the USB, because this is not reversible.

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo umount -l /dev/sdbx
sudo dd if=/dev/zero of=/dev/sdbx

Replace x with your device ID.

Make sure that you format the drive after that.

Mitch
  • 107,631
0

open disks, unmount your usb stick, format it, done worked for me

  • used sudo shred -v now, 3 passes random wipe. As I said, I even erased the partition table and didn't work. Probably created some kind of hidden partitions I could not reach, formatting didn't work. Also I could not anyway do that because my only option was to eject it, I couldn't mount/ unmount it because it had no table format seen by the system – Mihai Bujanca Jun 16 '13 at 16:07
0

I had this exact problem after using a flash drive as an ESXi boot drive. I finally solved it by using the GParted live CD. Nothing else worked for me.