LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2015, 02:20 AM   #1
jaydul
Member
 
Registered: Sep 2012
Posts: 65

Rep: Reputation: Disabled
Exclamation 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.
 
Old 08-20-2015, 03:13 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,194

Rep: Reputation: 164Reputation: 164
https://wiki.centos.org/TipsAndTricks/ReinstallGRUB
 
1 members found this post helpful.
Old 08-20-2015, 03:17 AM   #3
jaydul
Member
 
Registered: Sep 2012
Posts: 65

Original Poster
Rep: Reputation: Disabled
Thank you.But its for Centos 5/6 But my PC on centOS7
Quote:
Originally Posted by Keruskerfuerst View Post
 
Old 08-20-2015, 03:29 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,455

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
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
 
Old 08-20-2015, 06:41 AM   #5
jaydul
Member
 
Registered: Sep 2012
Posts: 65

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-20-2015, 07:26 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,843

Rep: Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472
It would help to include the error message...
 
Old 08-20-2015, 09:43 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,163

Rep: Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982Reputation: 2982
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleted Files by Mistake Soraya Linux - Newbie 4 02-01-2012 10:06 AM
[SOLVED] Deleted 'dmesg' by mistake.... honeybadger Slackware 7 05-31-2011 03:18 AM
[SOLVED] I have deleted crontab by mistake riganta Slackware 10 10-25-2010 02:41 PM
stupid noob mistake, deleted grub tylerrrrrrr Linux - Newbie 8 03-13-2009 04:56 PM
Am i done for? Deleted /etc by mistake AriciU Slackware 10 07-07-2007 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration