Re-install bootstrap code (GRUB)

Published May 14, 2011 by Siva

Please perform the following steps:

Boot from CentOS installation disc (for example, CD #1 or DVD).
Type “linux rescue” at the “boot:” prompt.

Mount all filesystems in read-write mode.
Change root to real root (‘/’) on your hard disk:

# chroot /mnt/sysimage

Re-install bootstrap code (GRUB).
If you wish to re-install GRUB to the MBR on a SCSI or SATA disk (/dev/sda):
# grub-install /dev/sda

If you wish to re-install GRUB to the PBR of Partition #2 on a SCSI or SATA disk (/dev/sda2):
# grub-install /dev/sda2

If you wish to re-install GRUB to the MBR on an IDE disk (/dev/hda):
# grub-install /dev/hda

If you wish to re-install GRUB to the MBR on a HP Smart Array disk (/dev/c0d0):
# grub-install /dev/cciss/c0d0

Alternative Recovery from GRUB Issues – Super Grub Disk
Super Grub Disk has a variety of open source boot recovery tools. For CentOS legacy GRUB SuperGRUB works well.

Advertisements

One comment on “Re-install bootstrap code (GRUB)

  • Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: