Wednesday, July 17, 2013

Repaire Grub in RHEL6

GRUB Repaire in Linux

The GRUB Is Corrupt



                                                      
If you are having trouble booting the system and you have determined that the master boot record (MBR) is corrupt, you need to boot into rescue mode. Use the RedHat DVD, boot from it, and choose the option to enter rescue mode and you will be redirected on shell prompt where you can perform repair task. Before repair grub i will recommend to you that please read my grub section to understand about grub and its functions.

Step 1. After you boot, when you see prompt enter the GRUB shell:
# grub
Probing devices to guess BIOS drives. This may take a long time. completions of a device/filename. Now you will redirect on following prompt.
grub>

Step 2. Locate the root drive by using following command:
grub> root
(hd0,0): Filesystem type is unknown, partition type 0x8e

Step 3. Reinstall the MBR from the GRUB shell: use following command to reinstall grub.
grub> setup (hd0)
Checking if “/boot/grub/stage1” exists... no
Checking if “/grub/stage1” exists... yes
Checking if “/grub/stage2” exists... yes
Checking if “/grub/e2fs_stage1_5” exists... yes
Running “embed /grub/e2fs_stage1_5 (hd0)”... 26 sectors are embedded.
Running “install /grub/stage1 (hd0) (hd0)1+26 p (hd0,0)/grub/stage2
/grub/grub.conf”... succeeded
Done.
Here you can see grub has been successfully reinstalled.
Step 4. Reboot the system to validate that the system boots properly:
# reboot

No comments:

Post a Comment