I deleted 2 partitions from Windows 8 disk manager. It turned out one of them is the grub partition. Now the laptop directly goes to grub rescue mode. I used F12 to select the system I want to boot into, but all ended up in grub rescue. The ubuntu installation CD does not help either. Does anyone have any idea to resolve this problem?
You can use Boot Repair
Just boot from the Ubunut LiveCD, and once it boots up, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
Run Boot Repair once the installation is done.