I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this?
I can't lose my Ubuntu files, and I'm afraid that I might break GRUB.
|
I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break GRUB. |
|||||||||||||||||||||
|
|
Here's the general outline:
Step One – Make space for WindowsOpen up GParted, and make sure that you have at least 20 GB 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 Step Two – Install WindowsInstall Windows 7 into the space you just made Step Three – Mount
|
|
|||
|
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 Pirocchi
Dec 31 '10 at 4:02
|
||
|
|||
|
A safer instruction instead of
rm -rf /boot is: mount --bind /mnt/boot /boot
– Amr Mostafa
Apr 20 '14 at 19:32
|
||
|
Did exactly as shown here, but did not work for Ubuntu 14.04. After invoking grub-install, Ubuntu automatically boots, no GRUB boot menu shown. The method shown below (Peachy's answer), however, worked (
boot-repair).
– Jan-Philip Gehrcke
Jul 8 '14 at 0:49
|
|
Installing Windows after Ubuntu is not the recommended process for a dual boot Windows and Ubuntu system, but it is possible.
|
|||||||||||||||||||||
|
|
boot-repair did a really good job launched from a live-usb, by just applying the recommended option. |
|||||
|
|
When you boot have you checked the boot order on your BIOS? If you're booting straight to the hard drive it will always miss the USB. You need to move the USB device boot option higher in the priority list. Also check that your computer allows you to boot from USB in the USB port you are using. |
|||||||||
|
|
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 number, make & partition number within that) of the 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. |
|||||
|
|
In case your computer came with a pre-installed copy of Windows 8 and you removed it because to many people told you to hate it and you found that after you installed Ubuntu, that it isn't what you want, note this: Your computer boots with UEFI and has a GPT partition table.For installing Windows 7, either create and boot the Windows 7 installation media in UEFI-mode or set boot-mode and partition table to legacy. |
|||||||||
|
|
First, you have to boot with a live CD/USB stick 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 three partitions or four if you have a swap partition.) When your partition is ready, just boot with your Windows 7 DVD/USB stick 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 stick and fix it (how it is mentioned in other comments). Now another issue that some users may face: I own an HP Mini 210 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 application from my university which wouldn't run through wine). At that time I had three partitions:
Now when I tried to install Windows 7 I faced a problem because Windows 7 needs to create a second primary partition (system reserved). I already had three 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:
|
||||
|
|
|
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. |
|||
|
|
|
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. |
|||
|
|
|
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. |
|||||||||
|
Boot that USB
Reboot... |
|||||||||
|
|
Basically the same answer as @evgeny, but using
|
||||
|
|
|
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! |
|||
|
|
|
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 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. |
||||
|
|
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?