An easy way is to use a Ubuntu livecd.
- Boot Ubuntu 11.10 with the livecd
- Start the disk utility with the command palimpsest to find the partition where Ubuntu was installed to. On my hard disk it was /dev/sda5.
- Use your partition number instead of the 5…:
sudo -i mount /dev/sda5 /mnt grub-install --root-directory=/mnt/ /dev/sda
- restart
