Thursday, September 5, 2013

RE-INSTALL BOOTSTRAP CODE (GRUB)


When the system is repaired from using backup like data dump or TAR it may result in overwriting of master boot record (MBR). 
Thus, user needs to repair the bootstrap area before booting the system. Re-installation of bootstrap code (GRUB) can be 
performed in following steps :
 
=> Boot the system from CentOS 6.4 installation disc.
The above procedure results in boot menu from which select “Rescue installed system” 

=> Filesystems are mounted in read-write mode.

=> The root user is changed to real root on the hard disk using following command :
  #chroot /mnt/sysimage

Now Re-install bootstrap code (GRUB) as:

To re-install GRUB to the MBR on SCSI or SATA disk (/dev/sda)
 #grub-install /dev/sda

To re-install GRUB to the partition boot record (PBR) of Partition ,for example , second partition of SCSI or SATA disk (/dev/sda2) 
 # grub-install /dev/sda2

To re-install GRUB to the MBR on An IDE disk (/dev/hda)
 # grub-install /dev/hda

To re-install GRUB to the MBR on a HP Smart disk (/dev/cciss/c0d0):
 # grub-install /dev/cciss/c0d0
 
http://cbitss.com/6-months-industrial-training.html
 

0 comments:

Post a Comment