Have you installed Windows and Ubuntu in dual boot? If yes, you might have installed Windows First and the Ubuntu, which is a good way of doing it.
In case you have already Installed Windows on your computer, then you have another good options to install Ubuntu inside windows without formatting hard disk using Wubi Installer.
But the problem is when you have Ubuntu installed already and then you install Windows on it. On installing Windows on top of Ubuntu, Windows removes the ubuntu boot-loader called grub and replaces it with windows boot loader. In this case, you will not be able to boot into Ubuntu.
To fix this issue, we will tell you how to install the ubuntu boot-loader called grub on top of windows boot-loader so that you can boot into windows or ubuntu whenever you like.
Follow the below steps :
1. Once you have the ununtu live CD ready, boot your computer with this CD.
2. On first menu, select the language > English.
3. Select the option called “Try Ubuntu without any change to your computer”. This will launch ubuntu in live mode.
4. Once it loads the Ubuntu desktop, go to Menu > Accessories > Terrminal. This will open a prompt window.
5. On this prompt window, type command “sudo grub” without the quotes and press enter key. This will show a grub prompt.
6. On grub prompt type “find /boot/grub/stage1” without quotes and press enter key. This will show a output like this one “(hd1,4)” or something like that, note down the output you see on a piece of paper, its very important that u note it correctly else it will mess up the next steps. Lets assume you get something like “(hdx,y)”, where x is hard disk number and y is partition number which varied from computer to computer.
7. Now type “root (hdx,y)” without quotes and press enter.
8. Now type “setup (hdx)” without quotes and press enter.
9. After some processing you will see a message which says “Done”. After this, simply type “quit” and press enter.
10. Turn off the Ubuntu live session, remove the CD from CD tray, and your grub will be back. Now you can Run Windows Or Linux from the boot options.
Hope you find it useful and simple.