8 Answers
8

The only problem is the MBR section which now has replaced windows. Whenever you repair windows, it repairs MBR and uninstall the GRUB or whatever is written on it. So now your GRUB is not in the MBR and it directly boots you into windows.

To repair GRUB, you can use any live cd to boot into ubuntu and open up terminal and then issue the command sudo grub-install . Well, in many cases, that fails. For that, you have to manually mount the root partition and then re-install the GRUB into it. It follows as:

Ubuntu's installation replaces the win7 bootloader in the boot sector. It prompts you to choose which system you want to start each time. I recommend Debian if you want to run two or more operating systems on one machine. You should try to make the system swap area about 2 GB as well, because that could lead to system freezing in the boot section, I think.

Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
–
fossfreedom♦May 10 '12 at 12:35