I was installing Ubuntu 12.04(?) Lts and I didn't notice that my battery was running out because I fell asleep while waiting for the installation. When I tried to restart the pc after recharging, I tried to reinstall it. When the cd is attached my pc restarted after sometime. When I remove the cd it leads to the grub rescue.
By the way I'm new in using Ubuntu so I'm not very familiar with it.