LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Unable to re-install grub in centos 6.4 (https://www.linuxquestions.org/questions/red-hat-31/unable-to-re-install-grub-in-centos-6-4-a-4175485772/)

john aka jondi 11-24-2013 09:53 PM

Unable to re-install grub in centos 6.4
 
Hi All,

I recently download centos 6.4 minimal 1386 from http://centos.mirror.net.in/centos/6.4/isos/i386/ and installed it on my old Pentium4 32 bit machine at home. It has got one 80gb HDD and splited into 3 partitons. Two of them are ntfs filesystem consist of Windows XP present in them since long before. I made the third partition to ext4 and installed centos 6.4 in it. One day the XP went crashed and I had to reinstalled it for my parents. But then the trouble started, I lost the Dual Boot Selection at the machine startup.

I thought I would probably need to reinstall the grub of centos. So I put the same installation cd "CentOS-6.4-i386-minimal" into CD Drive which was used to install the centos and chose the "Rescue Mode".

Reference urls that google gave me:
http://www.centos.org/docs/5/html/In...mode-boot.html
http://www.confignotes.com/2010/12/h...grub-on-rhel6/


Steps I followed up:
- Selected “Rescue installed system”.
- Selected “Local CD\DVD” for the Rescue Method.
- On the “Rescue Screen”, selected "Continue".
- On the “First Aid Kit quickstart menu”, selected “shell Start shell”.
- I got the shell as "bash-4.1#" successfully.
- Then I tried to run “chroot /mnt/sysimage” and hit the following error :cry:

===========
bash-4.1# chroot /mnt/sysimage
chroot: failed to run command '/bin/sh' : No such file or directory
bash-4.1#
===========


How can I solve this error?. Can anyone please help me on this? :cry:

/dev/sda5 is the boot partition
/dev/sda6 is the '/' partition

smallpond 11-25-2013 03:55 PM

Reboot from the iso and follow the same steps, but before running chroot, make sure that it actually mounted your "/" and "/boot" filesystems under /mnt/sysimage by running the df command.

john aka jondi 11-26-2013 07:31 AM

Quote:

Originally Posted by smallpond (Post 5070522)
Reboot from the iso and follow the same steps, but before running chroot, make sure that it actually mounted your "/" and "/boot" filesystems under /mnt/sysimage by running the df command.

Thanks brother, yes "/" and "boot" were not properly mounting under /mnt/sysimage. Finally I had to do it manually and chroot worked fine. Also reinstalled grub :)

john aka jondi 11-26-2013 12:32 PM

You can check the complete procedure in my blog

http://penguinbliss.wordpress.com/20...einstall-grub/


All times are GMT -5. The time now is 11:25 PM.