LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CentOS 7 Deleted Grub by mistake (https://www.linuxquestions.org/questions/linux-newbie-8/centos-7-deleted-grub-by-mistake-4175551222/)

jaydul 08-20-2015 01:20 AM

CentOS 7 Deleted Grub by mistake
 
Hello
I had mistake and Remove Grub file and directory.How can I recovery Grub and boot my System.

When I boot it showing
Gbrub >

Here is many important file I cannot format or reinstall OS.

Keruskerfuerst 08-20-2015 02:13 AM

https://wiki.centos.org/TipsAndTricks/ReinstallGRUB

jaydul 08-20-2015 02:17 AM

Thank you.But its for Centos 5/6 But my PC on centOS7
Quote:

Originally Posted by Keruskerfuerst (Post 5408303)


John VV 08-20-2015 02:29 AM

cent moved to using the redhat documentation

it is in the redhat docs
https://access.redhat.com/documentat...erprise_Linux/
--reinstall-grub2
https://access.redhat.com/documentat...einstall-grub2

jaydul 08-20-2015 05:41 AM

I can run via rescue mode
then
Quote:

sh-4.2# chroot /mnt/sysimage/
Quote:

sh-4.2# /sbin/grub2-install /dev/sda
then try to reboot but getting error
running in chroot ignoring request.

What can I do

jpollard 08-20-2015 06:26 AM

It would help to include the error message...

michaelk 08-20-2015 08:43 AM

Which directory did you delete, /boot/grub2?

The OP needs to reinstall the grub package first versus re-installing the boot loader code.

yum reinstall grub2


All times are GMT -5. The time now is 04:11 AM.