Repair GRUB2 In Linux Box

Sometimes when we have double boot system (Windows + Linux) in our computer, we have problem with GRUB that make we can’t boot the OS. New Linux distribution use GRUB2. To repair the GRUB2 installation we can use this procedure. Boot using Linux Live CD (in this example I used Ubuntu Live CD) and open the terminal.

Suppose the root partition lay on /dev/sda1 (you can check which root partition by usingn fdisk -l command) then the command would be like these :


ubuntu@ubuntu:~$ sudo mount /dev/sda1 /media/
ubuntu@ubuntu:~$ sudo mount --bind /dev /media/dev/
ubuntu@ubuntu:~$ sudo mount --bind /proc /media/proc/
ubuntu@ubuntu:~$ sudo mount --bind /sys/ /media/sys/
ubuntu@ubuntu:~$ sudo mount --bind /dev/pts/ /media/dev/pts/
ubuntu@ubuntu:~$ sudo chroot /media/
bash-4.1#
bash-4.1# grub-install /dev/sda
Installation finished. No error reported.
bash-4.1# grub-install --recheck /dev/sda
Installation finished. No error reported.
bash-4.1# exit
ubuntu@ubuntu:~$ sudo reboot

Tested on Ubuntu 10.04.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.