I just installed Ubuntu, a full install removing the prior OS. I was forced to remove Windows 7 from my HP dv6 because of the max four partitions already being there. I didn't lose anything, all backed up. However, now I am looking to create another partition and install Windows 7 on it.

Do I also need some sort of boot loader that lets me choose which to boot?

  • Four partitions is not the maximum on the hard drive. There is a mechanism called logical partitions which allows you to have almost any number of partitions.
    – mbaitoff
    May 1, 2012 at 4:47
  • @mbaitoff but that takes One primary partition - so if the manufacture has used all primary partitions you would need to change/remove one...
    – Mateo
    Jan 5, 2014 at 13:19

6 Answers 6


NOTE: Have a Linux distribution (Ubuntu) on a live CD handy before following the steps below.

  • Create partitions for Windows 7 using GParted in Ubuntu.
  • Boot the Windows 7 disk and install it on the partition created in the previous step. (Windows will not provide you with the option of choosing Ubuntu). So Ubuntu would seem unusable.
  • Recover Ubuntu by using a live CD (or live USB) and following the steps mentioned in Ask Ubuntu question Recovering GRUB after installing Windows 7 (at the end, you should have the option of choosing the operating system from the GRUB menu.)
  • 1
    My Debian 9 Live DVD only had parted, not gparted. Not so easy as I had to use resizefs first to shrink filesystem size inside partition and then run parted. (Some guesswork was involved in getting the resizefs and parted sizes working together.)
    – Will
    Oct 14, 2017 at 19:32

It's easy to install dual OS, but if you install Windows after Ubuntu, Grub will be affected. Grub is a boot-loader for Linux base systems. You can follow the above steps or you can do just the following:

  • Make space for your Windows from Ubuntu. (Use Disk Utility tools from ubuntu)
  • Install Windows on freed space.
  • After installing, login to windows

To fix this you can install 'EasyBCD' in Windows.
Download it here

Follow these steps to restore GRUB when after installing EasyBCD:

  • Launch the program and select ADD NEW ENTRY from the EasyBCD Toolbox
  • Select the 'Linux/BSD' from the operating systems column
  • Choose GRUB (Legacy) under type and click on the ADD ENTRY icon
  • Choose YES to the restart prompt

GRUB will be displayed after the restart and will detect the Ubuntu partition for you to be able to boot into Ubuntu.

  1. use gParted to reduce Ubuntu partitions in order to create an empty NTFS partition (30Go~50Go at the start of the disk should be enough) that will receive Windows.
  2. via gParted add a boot flag on this partition
  3. Install Windows in this partition
  4. Reinstall GRUB in the MBR (eg via Boot-Repair's Recommended Repair)
  • Note that Boot-Repair will not work if you have booted up in Legacy mode, it only works in EFI mode. Dec 30, 2014 at 8:20
  • True only if your HDD contains an ESP.
    – LovinBuntu
    Dec 30, 2014 at 22:13

GRUB will let you boot into both OS's but installing Windows 7 after Ubuntu will remove GRUB from MBR, so you'll have to reinstall GRUB. Install Windows 7 on any partition of your choice and than follow this link to repair the GRUB. Unable to load Ubuntu after installing Windows


Delete a partition from your current setup that refers to swap area, or linux swap. You'll be able to re-create and tune it later. Create a logical partition in place of the removed one. From now on, you'll be able to create more logical partitions. Fill the created partition with you Win-7 backup (if you don't have enough space for it, resize other partitions to free some space beforehand). Then boot Linux and do update-grub, that will detect your Win-7 partition and will put a line for booting to it in the boot menu. Then reboot into your system of choice - you're dual-booter now!


Alternatively you could install virtual box and then loadup windows 7 as a VM:

sudo apt-get install virtualbox
  • 4
    Using Windows through a VM tends to worsen the peformance of fancy graphics and visual effects, from my experience with running Windows 8 in a VM. Dec 30, 2014 at 8:23
  • In my case, I wish to downgrade BIOS from 208 to 206 as I've found onthe internet that this BIOS works better on my laptop as it gives superior graphics performance. The only possible solutions are on Windows. It's too risky to perform on Linux :) So virtualbox is not the solution
    – Erikas
    Aug 2, 2016 at 8:58

Not the answer you're looking for? Browse other questions tagged .