How to safely remove Ubuntu 12.04 from a dual-boot installation with Windows XP?

8,936

You do not need to remove an old install of Ubuntu before installing anther distro, you also don't need to re-install Windows bootloader and definitely you don't need to resize Windows partition to take up the space previously occupied by Ubuntu.

Just boot from Kubuntu/Lubuntu LiveCD/USB, choose "Other" when it asks you whether you want to install instead of Windows or alongside Windows and manually choose the partition(s) previously used by the previous Ubuntu install.

Make sure you're ticked "Format partition", which will re-format the partition, removing all the data from it.

Share:
8,936

Related videos on Youtube

Daniel H
Author by

Daniel H

Updated on September 18, 2022

Comments

  • Daniel H
    Daniel H over 1 year

    Possible Duplicate:
    How to remove Ubuntu and put Windows back on?

    I have an Acer Netbook with Windows XP on it.
    I had installed Ubuntu 12.04 (actually upgraded from 10.?? to 11.04 to 11.10 and on to 12.04) I want to remove Ubuntu 12.04 and try some other previous version or kubuntu or lubuntu because I am finding 12.04 slow and the read/writes to USB devices (whether flash or ext HDD) terribly slow. I just can't use it this way.

    I found a bunch of info on how to remove Ubuntu safely. But that involved installing EasyBCD and when I installed it, it told me that it cannot find the BCD registry and that it would work only on Vista and Windows 7.

    In my understanding, uninstalling/removing Ubuntu safely involves 2 or 3 steps. 1. Fix mbr 2. delete the linux partition 3. Expand the windows partition to use the unallocated disk space (got from deleting the linux partition).

    In order to fix the mbr, I used the following commmand that I found here.

    sudo lilo -M /dev/sda mbr
    

    I created a bootable USB stick with 11.04 and booted the netbook with it and then did the above command.

    After that rebooted the PC, chose to boot Windows (from the Windows multiboot menu - the GRUB menu was gone as a result of the above lilo command I assume).

    Then I did diskmgmt.msc and deleted the linux partition (sda3). But I was not able to resize the windows partition (sda2) since Windows XP does not have that option. I tried using gparted to do the resizing as mentioned here, but that somehow did not work. That is - the sda2 showed up as 87.72 GB and it did not allow me to increase the size to include the 47.23 GB space that is unallocated as a result of deleting the linux partition.

    Now, when I boot, it still shows me 'Ubuntu' in the windows multiboot menu. Is there a way I can get rid of it so that it only shows Windows?

    I am going to install 11.04, but I would still be able to resize the unallocated space so that I could try another version as well which allows me to use USB HDD at a decent speed.

    Thanks

    • Daniel H
      Daniel H over 11 years
      @JohnSGruber, sorry, there is no message. I would have tried the cmd you suggested (gksu gparted) but now I have already installed 11.04. Basically, I understand (from the link in my post above) that there are two ways to extend the partition. (1) by specifying the max limit (so, I took the size of sda2 which was 87.72 and added the size of the unallocated sda3 which was 47.23 and thought that that is value i need to speciy in the max value, but it would not go above 89xxx mib. (2) the other way mentioned was to drag the right edge of sda2. but it did not let me do this either.
    • Daniel H
      Daniel H over 11 years
      @Eliah Kagan, yes, this is not a dupe of that question. As a result of my lack of knowledge, I thought I need to remove 12.04 first and then install 11.04. It was not clear to me (and still isn't) how a further install of 11.04 was possible when the HDD was already divided into Windows (sda2 - 88 GB) and sda3 (48 GB) effectively taking up the entire 160 GB of the netbook - without doing further repartioning, that is.
    • John S Gruber
      John S Gruber over 11 years
      I understand better with your recent comment, no need to sweat an error message. It sounds like you have another partition in the way of increasing the size of sda2 (swap maybe?). The numbers sda1, sda2, etc. don't necessarily signify the order in which things are on the disk, by the way. Could you attach a picture of your gparted screen? Alternately you could go to your 11.04, Press Alt-Ctrl-T to get a terminal, and run sudo fdisk -l and that output will give us a better picture of the partitions on your disk and maybe give us a clue why you can't expand sda2 more than a little.
  • Daniel H
    Daniel H over 11 years
    thank you for your quick response. I am quite new to Ubuntu/Linux and don't quite understand the concepts. So I was under the impression that I need to do the things I mentioned. Thanks for clarifying. I tried to do a new install from live USB, and did choose the "Other" option when installing, but got scared when I saw the following screen since I did not quite know what values to enter there. So, I chose the first option (alongside windows) and it has installed 11.04.
  • Daniel H
    Daniel H over 11 years
    now, there are two swaps. I would still like to know, if possible, how to remove/uninstall Ubuntu and restore the system to run only Windows XP, and what to configure so that only Windows boots or only Windows shows up in the windows multiboot menu. Thanks
  • Sergey
    Sergey over 11 years
    @user82171: The question linked to in the comments (askubuntu.com/questions/133533/…) discusses removing Ubuntu and making Windows the only OS on the machine in great details. Basically, you need to boot into Windows Recovery Console and use fixmbr command to re-install Windows bootloader, which will get rid of the boot menu.
  • Daniel H
    Daniel H over 11 years
    thanks for the link. I have a netbook and I have backed up the preinstalled Windows OS using an external DVD drive. But now I don't have the external DVD drive, so I am not able to use those backedup DVDs to come up with the Recovery Console. So, I am unable to use that method. The author at this link (enhanced-reality.net/misc/fixmbr-usb/home?do=backlink) also seemed to have my problem (couldn't use fixmbr for a different reason) and so he used lilo, and without understanding enough, I also tried to do it.