Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 10.10 on my laptop. Now I want install Windows Seven in doubleboot. How can I do this?

I can't loose my Ubuntu 10.10. And I'm afraid that I might break grub.

share|improve this question
4  
If you will only use Win 7 occasionally you can also try installing it as a guest or a virtual machine using virtualbox. See this question and it accepted answer including the comments for details on that option. – koushik Oct 12 '10 at 7:43
2  
For convenience next time install Windows before Ubuntu to save the GRUB hassles. – Oxwivi Feb 19 '11 at 7:18

11 Answers

up vote 28 down vote accepted

Here's the general outline:

  • Make space for Windows 7
  • Install Windows 7
  • Reinstate grub
    • Mount the /boot partition
    • Install the bootloader

Step One: Open up gparted, make sure that you have at least 20 gigs available for Windows 7, either as a partition you can remove, or as unpartitioned space. If it's a partition, remove it from grub to make sure it doesn't break your Ubuntu install -- gparted will complain if anything bad is about to happen. Make note of current /boot device. If that doesn't show up there, make not of the / device. The device name is something like sda5

Step Two: Install windows 7 into the space you just made

Step Three: Load up from your Ubuntu LiveCD, then run these commands.

If you DO NOT have a separate /boot partition:

sudo mount /dev/DEVICENAME_FROM_STEP_ONE /mnt
sudo rm -rf /boot    # Careful here, make sure YOU ARE USING THE LIVE CD. I tried it, it works.
sudo ln -s /mnt/boot /boot

If you have a SEPARATE /boot partition:

sudo mount /dev/DEVICENAME_FROM_STEP_ONE /boot

Step Four: Then continue with those commands:

sudo apt-get update && sudo apt-get install grub-pc
sudo grub-setup /dev/sda     # NOTE THAT THERE IS NO DIGIT
sudo umount /boot

And restart. It should work fine and boot both systems.

share|improve this answer
5  
Also, make sure you backup your important data before doing anything. – evgeny Oct 12 '10 at 7:43
Best unsver! Big thanks! – Sk8er Oct 12 '10 at 9:15
1  
At least in Ubuntu 10.10, grub-pc is included on the live CD (so you can skip the line sudo apt-get update && sudo apt-get install grub-pc). – Matthew Dec 31 '10 at 4:02
1  
i am getting an error while executing: sudo grub-setup /dev/sda grub-setup: error: cannot stat /boot/grub/ Can you tell me where I am going wrong? – user11105 Feb 19 '11 at 13:34
I ran into a small problem while doing this. After running step 4, windows 7 vanished from the boot menu. All I had to do was login into ubuntu and run the step 4 again. Hope that helps someone. – Khaja Minhajuddin Mar 28 '11 at 7:51
show 1 more comment

Installing Windows after Ubuntu is not the recommended process for a dual boot Windows and Ubuntu system, but it is possible.

  • First, you have to make sure that the 50GB free space is available, resizing your Ubuntu by using gParted if necessary.
  • Also use gParted or Disk Utility to format the the free space as NTFS, this prevents Windows 7 from creating an additional boot partition in addition to the "C" drive.
  • Next, boot to the Windows DVD installer and install Windows on the NTFS partition. Upon reboot, Windows will automatically boot and you won't see the grub menu allowing you to choose Ubuntu, because the Windows bootloader has replaced grub.

  • Now, what you need to do is run Ubuntu from LiveCD or LiveUSB and install boot-repair.

  • To install boot-repair, open up a terminal by pressing Ctrl+Alt+T and type the following commands:

    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair
    
  • After installation, boot-repair will automatically launch, if is doesn't, launch it via Dash.

  • Make sure to select recommended repair to repair grub. Reboot and that's it.

  • You should now have a Grub menu on boot, allowing you to choose from Ubuntu, memtest, and Windows 7
share|improve this answer
2  
Thanks, perfect. Just to mention you will also need an internet connection. And to run terminal to put the aforementioned commands Hit super-key in you keyboard(usually with windows logo in it) and type Terminal. Use terminal to put the commands. – Marcos Maia Jul 8 '12 at 16:04

boot-repair did a really good job launched from a live-usb, by just applying the recommended option.

share|improve this answer
This worked amazingly well. Thanks for the link. – Gazler Mar 21 '12 at 21:50

To install windows you need an empty partition that will be dedicated to windows. If you do, then go ahead and install on this using the normal installation procedure. After installation reboot into windows and reboot a few times more to experience windows ;-) (sorry, couldn't resist)

Like you said, this will break grub and your computer can only boot windows after this. Do not despair, as there is a help section dedicated to restoring grub and being able to dual boot. Look here. After performing this, your computer will be able to boot Ubuntu as well as Windows.

Before you start, very very carefully note down the location (hard drive #, make & partition number within that) of current Ubuntu install (which you don't obviously want to overwrite) and the empty partition in which you want to install windows. Also, during windows installation, if it offers to format any partition other than the one you are installing windows into, please do not accept.

share|improve this answer

First you have to boot with a live cd/usb and shrink your partition in order to create a second one. Windows 7 requires and creates a second partition which is called "system reserved". I don't know why but it does. (So you will end up with 3 partitions or 4 if you have a swap partition)

When your partition is ready, just boot with your windows 7 dvd/usb and install windows 7 on the new partition.

When windows 7 has been installed, grub will break and you will only be able to boot windows (automatically). Just boot with a live ubuntu cd/usb and fix it (how mentioned in other comments)

Now another issue that some users may face:

I own an HP 210 Mini netbook which came with windows 7. I erased everything and installed Ubuntu. Later on I decided to also reinstall windows 7 and have a dual boot (needed windows for a specific app from my university which wouldn't run through wine). At that time I had 3 partitions:

- Ubuntu
- Swap
- Backup/Download storage

Now when I tried to install windows 7 I face a problem cause windows 7 needs to create a second primary partition (system reserved). I already had 3 partitions and therefore was unable to create two more. The workaround here is to create an Extended partition in which you will include both Swap and Backup storage. Now I have:

- Ubuntu (primary)
- Extended
  - Swap
  - Backup/Download storage
- Windows 7 (primary)
- Windows 7 system reserved (primary)
share|improve this answer

One good advice: When you make the separate partition for Windows 7, using gparted for example, format it to the NTFS right away. Do not use Windows installer to format the partition, because several times I had a situation, when the Windows installer corrupted the partition table after that and I had to restore the lost partition. So, as the people recommended here: using gparted, create separate partition, format it to the ntfs, install windows there, then restore grub using livecd or liveflash. You can use the SystemResqueCD for liveflash.

share|improve this answer

I suggest you virtualize Windows 7 with something like VirtualBox (http://www.virtualbox.org)

This way you can run Windows and Linux at the same time, without the chance of destroying you Bootloader Grub.

I don't know why you want to run Windows 7, but if you don't need the full hardware capacity (Running the Latest 3D Games for example) of your computer for windows then virtualization can be a good solution.

share|improve this answer
sometimes running windows virtualized through vbox or vmware limits the user.. if he/she wants to run i.e. games, this might be an issue? – Antonis Oct 12 '10 at 8:55
Yes, running modern games is not going to work virtualized, but if you don't do that this might be a nice solution. – Niels van Reijmersdal Oct 12 '10 at 9:47

The most save way is to install Windows 7 first and to reinstall Ubuntu after that. This will ensure that grub works.

You can also edit your partitions with a live cd, and then install Windows 7. When you have done this you boot into Ubuntu with a live cd and restore grub. This procedure however, is a bit more delicate than just installing them in the right order.

share|improve this answer

Installing windows after ubuntu is a pain but after you do this you'll need to put in your ubuntu live cd and install boot-repair and run that. Becouse installing win7 after ubuntu will break grub. But, boot-repair will remedy that!

share|improve this answer

Its a easy process to install dual OS. 1st create a NTFS partition from Ubuntu using Disk Utility. Then restart your system and continue with your windows installing. After finishing installing you can see that your GRUB is not working..... NOT A PROBLEM. I have two method to fix this GRUB problem.

Method 1

[Method 2] It may be bit difficult. Don't worry i have also a easy one. For that you have to login into windows. Download EasyBCD and run it. Go to Edit Boot Menu and set your desired boot option as default. Then save it and reboot your system. [Tested under windows].

Please let me know if you stack in something.

share|improve this answer

Download Puppy Linux.

Boot it

Goto Menu-System-Install GrubForDos.

It will auto detect windows and ubuntu.

Follow the instructions and enjoy!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.