[TAG] How do I reformat an Ubuntu installation?
nguyenminh2 at gmail.com
Thu Nov 29 15:42:51 MSK 2007
> I've tried using "fdisk" but get the error message "Unable to open /dev/hda" which suggests a
> problem somewhere, yet Ubuntu currently runs with out any problems.
Is your master hard disk an IDE HDD or a SATA HDD? I've come across a
similar problem when trying to install Slackware 12.0 on a PC. Then I
realised that the PC's specifications contain a SATA HDD, so I used
cfdisk to reformat /dev/sda, which was the master HDD.
> Do I continue with fdisk? If so, how? Or try something else? Once
> reformatting is successful, will the PC boot directly off the CD or do I
> need to make a boot disk of some kind? Many thanks for any tips.
I think Rick Moen has somewhat addressed this problem in this month's
thread "uninstalling linux". His tip is to boot your PC with a live
CD/DVD distribution, then execute the following command to reformat
your hard disk:
dd if=/dev/zero of=/dev/sdXX bs=512 count=1
In the same thread, I also talked about using Knoppix to wipe out all
partitions on an HDD. Just in case you haven't come across this tip,
I've reproduced it below:
A "quick and dirty" way is to get yourself a copy of a Knoppix
distribution. Perhaps from Knoppix 5.x onwards, maybe from 3.x onwards
would also do the job. Here, I assume that you use Knoppix 5.0.1 or
5.1.1 CD/DVD distribution.
 Set up your BIOS to boot a CD/DVD drive first.
 Boot up the Knoppix live CD/DVD. This will take a while to load X
and get you into KDE, a graphical session under Linux.
 Once KDE is ready to use, locate the "K" icon in the bottom-left
corner of your screen. This is the menu for KDE, similar to the
"Start" menu under Windows XP.
 Click on the K menu and locate "System". You need to be patient
with live CD/DVD distributions, depending on your system's hardware
specifications. Once the "System" menu pops up, click on a program
called "QTParted". I think there are two icons for this tool within
the "System" submenu:
1. QTParted (create, reorganize and remove partitions)
2. QTParted (QTParted)
You can choose either of these two programs.
 I assume that you're using IDE HDD(s) and IDE CD/DVD drive(s).
Once QTParted is up, you need to familiarize yourself with the
"Device" tree on the left side of the program window. If you have two
IDE HDDs, then your master hard drive will be /dev/hda (this is also
the case if you have only one IDE HDD), and your slave drive will be
/dev/hdb. Your IDE CD/DVD drive(s) will be /dev/hdc for the master
drive, and /dev/hdd for the slave drive.
 Familiarize yourself with /dev/hda and/or /dev/hdb, as the case
may be. Note down the drive and/or partition(s) that you want to
delete/wipe/format/reformat. Say you want to keep /dev/hda intact, but
you want to wipe everything on /dev/hdb. Then on the "Device" tree,
click on /dev/hdb. A visual representation of the drive should appear
on the right side of your screen. This is similar to what you would
get if you have ever format/reformat/defragment drives under Windows
 Right click on any partition to get yourself familiar with the
options for formatting, resizing or deleting partitions/drives.
 In your case, I assume that you want to delete all partitions on
/dev/hda. In the "Device" tree, click on /dev/hda. Then right click on
a partition and choose "Delete" to wipe it out. This won't actually
wipe out the partition, yet, but just an indication that you want to
wipe it. Do this for as many times as you have partitions. Once you're
happy that all partitions have been marked for deletion, go to File ->
Commit. Be cautious here; this will actually wipe out all partitions
that you've marked for deletion.
 Once all partitions on /dev/hda have been wiped out, reboot your
machine. If everything goes well, you should now be able to
install/reinstall MS-Windows XP on /dev/hda.
Minh Van Nguyen
More information about the TAG