How to remove ubuntu partitions and use them to install windows

Solution 1:

Installing Windows after Ubuntu

This is not hard as everyone says, but you need to be prepared before you start or you will leave the computer in an unbootable state.

Basic procedure

  1. You can use gparted to resize a partition, but you must either boot from live media or be using a partition that is not mounted.

  2. Decide how much space you can spare. You will find various opinions out there, but Win 7 needs at least 40 GB IMHO. With games installed, you may need more.

  3. Back up your data. You have a lot of logical partitions. To delete logical partitions, you need to first be sure logical partitions with a higher number are unmounted. Moving partitions is not recommended.

  4. You need to create a primary partition formatted as NTFS. If you can let go of /dev/SDA15 The easiest thing for you may be to A) delete it, B) shrink your extended partition, and C) use the new unallocated space for your Win partition.

  5. Assuming you have a valid product key for Windows, when you insert the recovery discs or install dics, you need to choose the options that will not restore your computer to factory image or use the entire disk. The installer will be able to find the NTFS partition and install to that. The exact details of the Win installer menu are off-topic here, however, but you can find instructions for this part if you search. But be careful with this step; you don't want to accidentally blow away Ubuntu.

  6. Once you have rebooted the computer into Windows, follow the steps for first time use, validate your product key, etc. But Windows will have changed the MBR, so you will not be able to boot Ubuntu.

  7. You have a choice to stay with the Win bootloader and use EasyBSD or something to fix booting, but it's easiest to reinstall Grub2.

  8. See Reinstalling Grub2, but here's the key part of that page.

    A) Boot from the live media.

    In these examples, X is the drive letter (a, b, c, etc.); Y is the partition number (1, 5, etc):

    Example: sudo mount /dev/sdXY /mnt

    sudo mount /dev/sda1 /mnt

    Example: sudo grub-install --boot-directory=/mnt/boot /dev/sda

    sudo grub-install --boot-directory=/mnt/boot /dev/sda

    In short, you mount the partition, but install to the drive. The actual commands here are suggestions based on what you posted, but it's up to you to make sure you are installing Grub2 where you want it.

  9. Now Ubuntu will boot but not Windows. Login to Ubuntu and sudo update-grub

Solution 2:

Try Virtualbox. Emulate Windows. Hope it help.