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?
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:
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):
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.
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.