In my laptop I had Ubuntu 10.10 for a long time. Recently I wanted to use Ubuntu 12.04 LTS version and therefore I installed it in a separate partition in my machine. So, when I start the machine Grub shows up with the options to select either Ubuntu 10.10 or Ubuntu 12.04 to boot.
However after few days I lost my interest on the new interface in Ubuntu 12.04. Therefore I moved back to use my previously used Ubuntu 10.10 version. Since I didn't need Ubuntu 12.04 installation any further, I formatted that partition where Ubuntu 12.04 is installed. I did that while working on Ubuntu 10.10 version. However when the next time I start my computer I got a prompt which shows 'Grub Rescue>' text.
As I understand, when I format my Ubuntu 12.04 partition the Grub has been damaged. Because of this I couldn't even access my Ubuntu 10.10. At first I thought I would have to do so many configurations to fix this problem. However after searching the web for a while I finally found the solution.
There's a free tool called Boot-Repair which can fix frequent boot issues. This page (https://help.ubuntu.com/community/Boot-Repair) provides all the necessary information to use this tool which has very few steps. So, according to the instructions given I created a live USB stick with an Ubuntu image and then booted the laptop with it. When live Ubuntu USB is booted I went to the 'try ubuntu' option without installing it. After this live Ubuntu desktop is loaded, I installed Boot-Repair tool on this live version. Then I ran the Boot-Repair tool and had to just click a single button. When I restart the machine without using the live USB stick, the Grub showed up providing me the option to go to my ever loving Ubuntu 10.10 version.
That's it. Thanks to Boot-Repair tool I could solve the issue.