Fix grub

When grub is overwritten by other OS installation, you can resintall it by:

  1. boot ubuntu liveCD
  2. sudo fdisk /dev/sda (assuming your harddisk is /dev/sda)
  3. type p and see the partition number of your linux partition (my case is sda6)
  4. mount partition sudo mount /dev/sda6 /boot (mount Linux partition to /boot)
  5. grub-install --root-directory=/boot /dev/sda (reinstall grub)

All done, and can reboot now.

Tags: