Fixing GRUB bootloader on dual-boot PC

I have two versions of LinuxMCE on my HTPC – stable 0710 and developer 0810. The 0810 was installed after 0710. So, the GRUB bootloader was placed on 0810 partition. A few days ago I decided re-install 0810 from the scratch and I deleted its partition including GRUB booloader. As result I couldn’t boot 0710 anymore. Thanks to GRUB power and flexibility I was able to fix that problem and watch Champions League 🙂 The solution is simple and clear: boot from any LiveCD, drop terminal and type following command there:
sudo grub
>root (hd0,0)
>setup (hd0)

That’s it. After booting from HDD the GRUB menu was found again.

Grub is really cool!

AS I already wrote I made a small upgrade of my home PC: I boutgh LCD display and new hard drive. I installed the hard drive as a master and an old one as slave. The problem was I had two OS on the old disk – Linux and Windows and used GRUB as boot loader. After adding new hard disk and installing Windows there I couldn’t boot Linux anymore. I had to change boot options in BIOS to boot from slave disk and use Linux. It was terrible! Thanks to Yoshinori K. Okuji for excellent tool GRUB. I just loaded GRUB shell:
[root@maverik ~]$ grub
chose root (hd0 – master, hd1 – slave, but because I booted from slave it’s hd0 and master – hd1):

grub> root (hd0,5)
Filesystem type is ext2fs, partition type 0x83

and copied GRUB files to the master hard drive:

grub> setup (hd1,5)

As result I can boot new or previous version of Windows and Linux! Thanks to GRUB and Linux 🙂