Unix: Reclaiming your grub in Linux
When the Grub is corrupted or in condition of not working then we can reclain the Grub by following the given steps. Here is the process of restoring Grub, using a live CD.All you have to do is to follow the steps given below:
Step1) First boot with any Linux live CD.
Step2) Open a terminal and then run the following command to get the Grub command mode:
sudo grub
Step3) Use the following command to find the partition that has the grub boot loader.
find /boot/grub/stage1
step4) Note down the partition that has grub as listed by that above command, and run the following command to make that partition your root partition:
root(hd?,?)
…where (hd?,?) is the partition returned by the find command.
Step5) Next run the following command to install grub:
Stepup (hd0)
This will install grub on the Master Boot Record (MBR) of the first drive. If you want to install grub into boot sector of a partition instead of the MBR, specify the partition instead of installing it in the MBR, specify the partition into which you want to install grub as given below:
Setup (hd0,4)
Step6) Type in the following command to quit from the Grub command line:
Quit
Now reboot your computer! You have reclaimed your grub, happy surfing.
Tagged with: grub • grub in linux • grub password • grub redhat linux 4 5 • grub settings • how to get the password of grub • how to grub • how to recover grub in linux • linux grub • reclaiming grub password • recover grub password • recover grub settings • recovering grub
Filed under: General • IT scenarios • Linux
Like this post? Subscribe to my RSS feed and get loads more!











Leave a Reply