Fix grub2 after installing ubuntu 12.04

I've installed ubuntu 12.04, but after rebooting I get the message:

GRUB loading:
Welcome to GRUB!

error: file '/grub/i386-pc/normal.mod' not found
Entering rescue mode...
grub rescue>

I have the following partitons setup:

/dev/sda6:  /boot  ext2
/dev/sda9:  /      ext4
/dev/sda8:  swap
/dev/sda7:  /home  ext4

I guess that some of the prefixes for GRUB are wrong due to the /boot partition? Or there might be a problem with EFI? The hardware is a 1015bx asus netbook with c-60 amd fusion chipset. How can I fix this GRUB problem from the rescue prompt?


Solution 1:

Boot your system into a live CD. Mount your system into the live CD:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys

Log into the mounted system:

sudo chroot /mnt

Install grub:

grub-install --boot-directory=/boot/ --recheck /dev/sda

Reboot your system.

Solution 2:

You can type the command at grub rescue:

grub-install /dev/sda

Then quit the grub rescue mode and reboot the machine


Or :

You can install GRUB on your hard disk. You can do this by using bootable Ubuntu CD.

  1. Boot to LiveCD

  2. When you get Ubuntu Live Desktop. Open terminal ( What is a terminal and how do I open and use it? ) and type the following one line at a time:

    sudo grub-install /dev/sda
    
    sudo update-grub
    
    quit
    

You are done now. Reboot the machine.

This will install grub on MBR of your hard disk with dual boot. Try the latest Ubuntu 12.04 LTS.