Rescuing Grub after Ubuntu server upgrade

Recently, I had to upgrade a server which was running Ubuntu 10.04-server image to Ubuntu 12.04. I have upgraded Ubuntu server once before and it went really smoothly. So, I thought this will be over in a jiffy but, as luck would have it, this time something else was in store for me. Now, the…