Thursday, August 12, 2010

Easy way to Reinstall Grub.

Hi friends,
Most of them will be using their Computer system as dual booting with both windows and ubuntu linux.If windows is installing after Linux installation then it will leads to the loss of GRUB.If Grub is lost then Just follow these simple steps and reload the Grub.
Step 1.Enter the required OS(Ubuntu Linux) and bootin as live Cd.
Step 2.Open the terminal and enter this

"grub-install -v"

This will show the current version installed on your computer system i.e.,GRUB 2 should display a version number of 1.96 or Legacy GRUB is version 0.97.(Their is no need to do this step to all those who use the latest version of Ubuntu after 9.10)
Step 3.Mount the installed ubuntu partition from Places menu by clicking it.
Step 4.Now enter the below in terminal.

"mount | tail -1"

The output will be just like this,

" ubuntu@ubuntu:~$ mount | tail -1
/dev/sda6 on /media/953b6aec-279f-4cd2-bd9f-4bc872fc1f6b type ext4 (rw,nosuid,nodev,uhelper=udisks) "
Step 5.Now its time to reinstall Grub by specifying the correct directory and the correct drive name.Enter the below in terminal.(Note that drive name should be correct.If not make it correct.)

" sudo grub-install --root-directory=/media/953b6aec-279f-4cd2-bd9f-4bc872fc1f6b /dev/sda "
Step 6. If the output is

" ubuntu@ubuntu:~$ sudo grub-install --root-directory=/media/953b6aec-279f-4cd2-bd9f-4bc872fc1f6b /dev/sda
Installation finished. No error reported. "

You can restart your Computer.

No comments: