When you get the grub command prompt:
grub >
It means something went wrong with the grub boot leader whether it was not installed properly or it cannot find your hard drive to boot into the OS. From this screen you can attempt to boot to the OS.
Run the command:
ls
which will list the hard drives / partitions it can see. The list will look something like this:
(hd0,1) (hd1,0) (hd2,0) (hd3,0)
You can then look at the contents of the drive to try and find out which one is the correct drive to boot into:
ls (hd0,1)
by going through each in turn you should be able to find out which one. If I remember correctly you can even go into the directories by adding the file separator after the hard drive e,g:
ls (hd1,0)/etc
Once you have found out which is the correct drive you can do the following:
grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot
This assumes (hd0,1) is the correct drive. Replace the vmlinuz- and initrd.img files with the correct version. You can use tab key to auto complete.
To fix grub forever running the following command after booting into Ubuntu:
sudo update-grub
Hopefully the above will help boot up to whichever operating system if Grub throws a wobbly.
How to Rescue a Non-booting GRUB 2 on Linux