View Full Version : [ubuntu] Removing previous Ubuntu installation from external USB hard drive

April 30th, 2009, 01:15 PM
On my first attempt at installing Ubuntu - as a dual boot - on my laptop, i forgot to disconnect the external hard drives and it installed itself on one of them.

Now that I have Ubuntu installed on the internal hard drive (bye-bye Vista) I would like to get rid of that old installation.

So, what with me being a linux newbie, I thought I had better ask how to go about removing this partition - if at all possible without losing the data on the other partition of that hard drive.

Can somebody supply me with a newbie-friendly step-by-step help on this ?

Any help is much appreciated.

April 30th, 2009, 01:40 PM
If you want to erase Ubuntu from the external drive, you can use gparted (install it if you don't have one in System -> Administration -> Partition Editor) and delete all the partitions on that external drive. You probably have to unmount the swap partition first (if you see a double-key in front of it) before you can delete it. Then, format it to whatever filesystem you want to use for the external drive.

April 30th, 2009, 01:53 PM
I like the gparted tool for this sort of job; you can get it one of 2 ways:

Command Line

Open a Terminal
sudo apt-get install gparted
enter your password when requested, its blind so don't worry that you can't see any typing, its working just press enter when complete.


Open Synaptic Package Manager
System>Administration>Synaptic Package Manager
Search for gparted
Tick its box
Click Apply
Click Apply again.

Okay the tool is in place, and you can find it in System>Administration>Partition Editor
It is very important to select the correct device that you want to format, in the case of USB drives, it is often /dev/sdb* and the internal drive is often /dev/sda*.
Once you are sure of which drive is which, easily figured out by looking at the listed drives in gparted BEFORE plugging in your USB drive, then go ahead and R+click delete the partitions off your USB drive, then R+click format to the desired filesystem (fat32 is a great choice if this drive will be shared with other operating systems, ext3 is a great choice if it will only be on linux systems), click Apply. Thats it your done, and you can use this tool to format thumbdrives, sd cards, and various other rewritable media.

GL and have fun.

April 30th, 2009, 02:04 PM
ok, I installed gparted and unmounted the partition I want to delete.

Question: I would like to extend the original fat32 partition with my data to the entire disk - is that possible ?

So what do I do in what sequence - do I format the linux partition to Fat 32 and then delete it ? What about the swap partition ? Or do I just delete them and resize the original Fat32 partition ?

April 30th, 2009, 02:21 PM
Or do I just delete them and resize the original Fat32 partition ?


April 30th, 2009, 02:27 PM
Um, ok, I deleted the two linux partitions and unmounted the fat32 because otherwise no options were available.

Now, however, when I click Resize/Move, it doesn't offer the space of the deleted partitions. I can only make it smaller, not bigger.

April 30th, 2009, 02:38 PM
You may need to executed the delete commands first. There's a big green checkmark in the toolbar on top (Apply), so in case you haven't pressed that yet after you told gparted to delete the existing partitions, do so please.

April 30th, 2009, 02:43 PM
Ok, being an impatient being and having a backup of my data, I decided to delete all of the partitions and created a new one. Formated it as Fat32.

Now the question remains:

How do I mount it again ? it doesn't offer that option in the menu.

April 30th, 2009, 02:46 PM
Ubuntu should autodetect the new partition. I'd just unplug and re-plug the USB drive.

April 30th, 2009, 02:55 PM
Or you can mount it by hand from a terminal if the automount doesn't work.

Assuming it's /dev/sdb1, you could do

sudo mkdir /media/sdb1
sudo mount -t vfat /dev/sdb1 /media/sdb1 -o umask=000
df -h

April 30th, 2009, 03:25 PM
I restarted the comp - that worked ok.

Now, one final question: How do I label it ?

I went back to gparted and right-clicked it - the screen went black and after a while came back at login - but frozen.