GRUB

GRUB Fix


How to fix a broken GRUB.


Often after using Norton Ghost to copy a Linux box that uses Grub, you will get the scrolling 'Grub' error. Here's how to fix this:


   1. PXE boot server into the rescue environment

   2. Chroot into /mnt/sysimage

   3. Make certain the boot partition is mounted to /boot

   4. Type: 'grub' This will bring you to a prompt


      grub>


   5. At the prompt, type:


      root (hd0,0)


          * This is the 1st partition of the 1st drive. Please adjust accordingly.

   6. Next, type:


      setup (hd0)


   7. After some verbose output, it should tell you if it was successful.

   8. Type:


      quit


   9. Reboot.


Similarly, 'grub-install /dev/boot-partition' is an automated way of accomplishing the same as above. However, the manual way has been found to be more reliable.



// grub.conf


title CentOS (2.6.18-53.el5)

root (hd0,0)

kernel /vmlinuz-2.6.18-53.el5 ro root=LABEL=/1

initrd /initrd-2.6.18-53.el5.img

page index