I initially formatted my Windows Vista Machine because it was given me problems and installed ubuntu 10.10 as the primary OS and no secondary installed all i have now is Ubuntu 10.10 running smoothly but now i want to install windows 7 as a secondary OS so that i can dual boot , Any Help?
migrated from stackoverflow.com Jan 14 '11 at 2:11
This question came from our site for professional and enthusiast programmers.
How to dual boot Windows 7 and Ubuntu 10.10:
Step 0: Back up your data
Back up your data. Seriously. Invest in an external hard drive or use a DVD burner. Although I've successfully run multiple dual-boots, problems can happen and there are plenty of horror stories on the Internet. Don't be a statistic. Back up your data.
Why? Most dual boots are setup with Windows as the existing OS and Ubuntu as the newcomer. You're doing something out of the ordinary, so if they tell you to back up your data when installing Ubuntu, then you better make certain you back up your data when installing Windows 7 as a dual boot.
Back up your data, please.
Step 1: Resize your partition and create a second partition
This article covers installing QParted on Ubuntu 10.10 and resizing your partition to create a new one: http://tech.mobiletod.com/how-to-create-disk-partition-on-ubuntu-10-10/
** For filesystem, you'll probably want NTFS, if you get the option. Otherwise, the Windows 7 installer will just reformat the partition for you.
Step 2: Install Windows 7
Once the partition is created, you'll want to install Windows 7. Use the "Custom" option so you can instruct the installer to use a specific partition. You can tell your new partition from your old partition using the following criteria:
These instructions document installing Windows 7 when there is an existing XP partition that you want to preserve. The instructions should be very similar.
Instructions for installing Windows 7 on a machine with Windows XP: http://lifehacker.com/5126781/how-to-dual-boot-windows-7-with-xp-or-vista
Step 3: Recover Ubuntu after installing Windows
Ubuntu is pretty good about creating bootloaders, using Grub, that will allow you to boot into Ubuntu or Windows. Windows is not so generous. You may install Windows 7 and discover that is your only boot option.
These instructions use your Ubuntu Live CD to boot into Ubuntu and reset your Grub bootloader.
You'll likely run into trouble. If you do, don't panic. You can use QParted to verify that your partitions are okay. If they are, then your data is probably okay, you just need to get your bootloader working again.
As stated in Step 0, data loss can occur. So as long as you've backed up your data, you could reinstall Ubuntu if absolutely necessary. If this happens, my suggestion is to install without overwriting the data. You may be surprised to find that your new Ubuntu installation contains the data from your old one. Say no to formatting when prompted to format your drive, just in case.
I believe you need to install Windows first since the boot loader will wipe out grub or whatever you're using to boot Linux. it's been a long time since I dual booted but I always installed Windows first since it does not play well with others.
You will also need to make sure there is enough unpartitioned space to create an ntfs or fat32 partition for Windows to use.
Here is a simple guide I found: http://www.linuxbsdos.com/2010/11/04/how-to-dual-boot-ubuntu-10-10-and-windows-7/