Using the guide on ubuntu.com I installed the image of the netbook edition on my external HDD using Pendrive on Windows. I was not aware that it would create such a mess and now want to get rid of it again, still retaining my old files. How can I do that?
Asked
Active
Viewed 1,051 times
1 Answers
1
If I'm not mistaken, the USB installer adds some files in the root folder of the USB disk and makes it bootable by adding some code in the Master Boot Record.
You can safely remove the files created by the USB installer using the Delete button.
You can restore (read: clear) the MBR (Master Boot Record) using the following command:
sudo dd if=/dev/zero of=/dev/sdX count=1 bs=512
/dev/sdX
is your USB drive, if you run ls -l /dev/disk/by-label
, you will labeled partitions, e.g.:
lrwxrwxrwx 1 root root 10 2011-03-04 22:58 ubuntu -> ../../sda1
lrwxrwxrwx 1 root root 10 2011-03-04 22:58 USBDRIVE -> ../../sdb1
Here, you can see that /dev/sdb
is the external USB. If your partitions are not labeled, you could use sudo fdisk -l
to get a list of partitions for each drive.
For relabeling the partition, you can use GParted, see How can I relabel my flash drive?.

Lekensteyn
- 174,277
-
Okay, knowing that already helps because I did not want to lose any data. Is there anything more that I might have to perform? For example, the HDD was also renamed to "PENDRIVE", how do I revert that? Thanks a lot for your answer :)! – Ingo Mar 11 '11 at 11:48
-
Are you using windows or Ubuntu right now? – Lekensteyn Mar 11 '11 at 11:56
-
Ubuntu of course ;) I only had to use Pendrive on Windows when I bought a new computer, and then replaced MS by Ubuntu – Ingo Mar 11 '11 at 16:05
-
Updated with information about the MBR (optional) and the disk label. – Lekensteyn Mar 11 '11 at 16:31