I had Windows 8 and wanted to try Ubuntu Linux. I installed Ubuntu and enabled it through dual boot. For some reason after couple of days I decided to remove Ubuntu Linux. To retrieve the space back, I booted to windows, deleted all Linux partitions, created a new drive and formatted it. Guess what, after rebooting the machine, I got “grub rescue>” prompt.
I did not know how to boot to Windows. I did some research and found couple of way to boot back to windows. The quickest way to get back my system boot to Windows was by booting my system with the Ubuntu Live CD. Open Terminal and run the following commands:
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr
I rebooted the system and voila… it booted to Windows. I saved tons of time. Thanks Ubuntu forums! Complete details are available here.