Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jan 14 '11 at 2:11

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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

  • You can use the Disk Utility that comes with Ubuntu to resize your partition. Alternatively, you can install GParted an use it to shrink your partition. I've used both tools successfully without problems. You'll need to shrink it enough to create a partition large enough for Windows 7. This means you must have enough unused space to shrink the partition. The partition should be a primary 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:

  • Size: Remember the size of your new partition
  • Type: If you picked NTFS, it will stand out. Ubuntu generally uses ext3 or ext4. Don't install windows on that partition! Be sure to select the NTFS.

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.

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Toubleshooting:

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.

share|improve this answer

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/

share|improve this answer
1  
You don't need to install Windows first. It's helpful, but not required. Instead, you can use your Ubuntu Live CD to refresh your bootloader after installation. Instructions are in Step 3 of my answer. –  jmort253 Jan 14 '11 at 6:00
    
Good to know. I'm rusty dual booting. :) –  peroty Jan 14 '11 at 6:13

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.