I had Arch linux on my computer and needed Windows for gaming; Windows installs its own boot loader, so I had to re-install grub. The following is what I did to restore grub.
I suppose that you know what you’re doing! For example you need to know in which partition linux is installed.
Boot Arch linux from live CD.
Create a directory for chroot environment:
Mount the root partition and other necessary device and file systems:
It seems that on newer Arch releases(2012), you can use
arch-chroot /mnt/root instead of the last 3 mount commands.
If you have a separate partition for boot, mount it:
Change the root:
You can define another shell by adding it to the above command, like this:
Generate grub.cfg file:
Exit the chroot environment:
Unmount filesystems and devices:
Unmount the root partition:
And finally, you can reboot: