Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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
    
If you have a PC (as opposed to a laptop), you'll find that buying a secondary HDD will simplify dual-booting enormously. It won't matter which system you install after which, because you'll get to choose the HDD you want to boot off of from the BIOS (there's usually some boot options hotkey like F12) –  Felix Jan 14 '11 at 7:54
    
Unless you use a USB3 port and disk, you will experience performance issues. –  jfmessier Jan 14 '11 at 12:44
add comment

3 Answers 3

This mainly depends on your existing disk layout. If your entire disk is already used for Ubuntu, you first have to resize it and/or reorganize your file systems/partitions to accomodate Windows.

Also, Windows may have issues if not installed on the first partition of a disk, but this is unclear to me.

But the bigger issue is that if you install Windows AFTER having installed Linux, you will [temporarily] loose access to Linux. This is because Windows will take over the boot sector for itself. It will not recognize Linux as an operating system, but the partitions (ext3, for example) will be seen as unknown partitions, and be left alone.

In order to fix this, you have to do the following: - Boot in Linux and get an initial list of all your partitions and mount points. You should be able to get this by using the mount command with no parameter. You don't even have to be root for this. Look for any line that contains "/dev/sd" in it. You can also enter:

mount | grep \/dev\/sd
  • Make a FULL BACKUP of your files. You never know what may happen.
  • Resize your disk to have Windows installed (make sure you have enough space for all your applications)
  • Install Windows itself (Base OS is sufficient)
  • Reinstall the Linux boot sector, so that it can offer a choice between Windows and Linux.

The last part is the one that may be short in time, although more complex and technically-oriented one. In order to rescue Ubuntu, you basically need to boot on a LIVE CD (I recommend the latest of Ubuntu, or the one of your installed Ubuntu distro) and from there reinstate the GRUB-based boot record.

Once you are booted, enter the commands (go one by one and check for errors):

sudo su
mkdir mydisk mount /dev/sda1 ./mydisk chroot mydisk /usr/sbin/grub-install /dev/sda

Replace /dev/sda with the partition that was mounted as / in the mount command previously entered. This should replace the boot record, reading the existing grub configurations, and also adding the Windows boot record, making it as an option in the new boot menu.

share|improve this answer
add comment

Create a new partition (I recommend NTFS for Windows) and at the beginning of the Windows installation process, you can specify on which partition you want to install to OS.

After, you have to reinstall GRUB (or any MBR you are using) to have the choice of which OS you want to use at the machine start-up.

share|improve this answer
add comment

Your Answer

 
discard

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