I have ubuntu 11.10, but i want to remove it, format my hard drive and install windows xp, but when i try doing this from the windows installer it says that the hard drive can't be formated so i would like to do it from the ubuntu installer without installing it again. Please help me thanks.
3 Answers
The easiest way to do this is to probably create a new partition table on the drive from the Ubuntu live CD/DVD or USB flash drive. This is lower-level than just removing all the partitions.
- Boot from the Ubuntu live CD/DVD or USB flash drive.
- Select Try Ubuntu (not Install Ubuntu).
- Run the GParted Partition Editor.
- To do this, you can click the Ubuntu button at the upper-left corner, type in
gparted
, then click on the GParted icon when it comes up.
- To do this, you can click the Ubuntu button at the upper-left corner, type in
- Make sure the proper drive is selected in the drop-down menu at the upper-right corner of the GParted window.
- If you have other drives and the wrong one is selected, you can lose data on them! You do not want to create a new partition table on the wrong drive.
- Click Device > Create Partition Table....
- Make sure any important files on the drive have been put somewhere else, before doing this!
- Click OK in the window that comes up. (You can, and should, almost always stick with the default "MS-DOS" style of partition table.)
- Quit GParted and reboot the system.
- Install Windows on the newly "blank" disk.
The GParted window will look something like this, though not exactly like it.
-
When choosing the "MS-DOS" type (MBR) partition table, does it have to do with how Windows may prefer that, or is it just obsolete information now? If I knew Windows could handle a
GUID Partition table (GPT)
, then I would choose that, since it's more modern and more flexible... Thoughts?– LeventeMar 18 at 16:11
Warning: this will completely wipe your hard drive, so if you have any documents/data on the installed Ubuntu back them up to a USB first!
Assuming you have only one hard drive, and you want to remove Ubuntu 11.10 and format the drive, please do this:
- Boot from the Ubuntu Installer/Live CD, and choose "Try Ubuntu..."
- At the Live Desktop, press
Ctrl-Alt-T
to open a terminal. - In the terminal, type:
sudo dd if=/dev/zero of=/dev/sda bs=1M count=8 && sync
- Shut-down the LiveCD.
- Insert the Windows XP CD and start it; the XP installer should now detect the blank hard drive.
Note: *If your computer is very old and uses IDE cables for the hard drives (wide connector), you may have to use
hda
instead ofsda
-
At steps 3. / 4., I presume you need to wait until the
dd
command shows some sign of being completed?– LeventeMar 18 at 16:06
IF you don't care about wiping all the data off your hard drive and just want to start fresh with XP:
- Boot into the Ubuntu live CD and run GParted.
- Delete all the partitions.
- Then, you can run the XP install.