This page aims to describe the precautions to take to avoid losing your Ubuntu if you want to (re) install Windows (TM) dual-boot (choice of Windows or Ubuntu at start). In many cases, installing Windows after an Ubuntu installation tends to cause damage to the Ubuntu installation. In this short tutorial, you will learn how to (re) install Windows without losing Ubuntu installation or settings.
Windows sometimes has strange behavior and may erase your hard drive without warning, so make sure you save all your data on an external drive to avoid losing them.
Page Contents
How to (re) install Windows without losing Ubuntu
Prerequisites
From Ubuntu:
- save your data on external media (DVD, key USB , external drive, etc.).
- save your user folder on an external medium.
- get a live CD (or live- USB ) Ubuntu, or better: Boot-Repair-Disk , which allows you to reinstall / repair GRUB after Windows installation in one click via the utility Boot-Repair
- Prepare your hard disk by creating the partition that Windows will receive. This must be a primary partition (primary and bootable), preferably disc-start (eg sda1), and size about 15 to 20GB minimum.
Warning: the Windows partition utility can make you lose Ubuntu. So first partition with GParted .
The Windows XP installation can be disrupted by GRUB. If you plan to install XP (In rare Cases), first restore a generic MBR via Boot-Repair.
Windows Setup
-
In the Windows Setup Utility, select the partition you created (if necessary, have it formatted by Windows to be able to take the next step)
-
install Windows on the partition you prepared for it.
Note: there is a good chance that this clears Ubuntu, or you are forced to format your drive for it. In this case, your Ubuntu will be unrecoverable, and you will have to re-install (In this case, Skip the next step and read how to Install Ubuntu Here).
Re-installation of the Boot Menu
The Windows installation has either cleared your MBR and replaced with your UEFI boot, and therefore the GRUB boot menu that you might have must have disappeared, therefore needs to be reinstalled.
If problem re-installing Ubuntu
If despite your precautions the previous Ubuntu is no longer accessible:
-
All you will need to do is re-install Ubuntu after (re) installing Windows . If you saved your / home directory, choose the same “username” (login session) as that of your previous Ubuntu and during the re-installation of Ubuntu then copy your / home previously saved in the / home of your reinstalled Ubuntu. And all of your User data will return.
Now that you have learnt how to install Windows without losing Ubuntu, you can now start enjoying your new dual boot!
after restarting computer asking for command in grub rescue… what to do… plz guide..
Are you trying to re-install windows? If the grub rescue comes up, all you need to do is;
– Insert a windows installation disc and boot the computer from the disc
– Instead of Install, select Repair.
– In the next option, click on command prompt
– In the command window, type and press enter after each line.
bootrec.exe /fixboot
bootrec.exe /fixmbr
Your computer should boot into windows now without problem. (But you cant boot into Ubuntu again. Until you re-reinstall GRUB.)