LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 12-03-2008, 07:52 AM   #1
diwakars
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: RHEL 5
Posts: 9

Rep: Reputation: 0
/boot/grub/grub.conf file has been deleted on rhel5


Hello gurus'

I've deleted /boot/grub/grub.conf file from my RHEL5 system for testing purpose.
I'm unable to do "chroot /mnt/sysimage" so how can I change to /boot directory. I was not able to mount my cdrom.


I have additional queries on this
1. What is exactly happening when this file is deleted??
2. How to recover my system in this scenario??
3. Does 512 bytes of the boot loader gets deleted??
4. Is there any other method to recover my system??

I would be thank full and helpful if anyone can solve this issue.

Thanks and regards
Diwakar
 
Old 12-03-2008, 08:40 AM   #2
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Here this should get you going.
 
Old 12-03-2008, 09:51 AM   #3
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
grub.conf is just nothing it is just a file in which entries are made so that next time when you boot your machine you don't have to boot your os manually, instead a file is being read and loadeded in which certain instructions are written that how to pass the control over the kernel and which os should start first.
your mbr is safe till this point,

is it 512 or 446 ?
 
Old 12-03-2008, 09:55 AM   #4
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
when you insert your rescue cd just do chroot /mnt/sysimage
then cd /boot
you have to make grub.conf yourself

here is my grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img
 
Old 12-03-2008, 10:12 AM   #5
diwakars
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: RHEL 5
Posts: 9

Original Poster
Rep: Reputation: 0
I mentioned that I cannot do "chroot /mnt/sysimage".
There is no directory called sysimage in /mnt. I tried doing it.
 
Old 12-03-2008, 11:21 AM   #6
chipotphe
Member
 
Registered: Nov 2007
Posts: 62

Rep: Reputation: 16
Quote:
Originally Posted by diwakars View Post
1. What is exactly happening when this file is deleted??
Nothing. Most of the time grub.conf is just a symlink to menu.lst.
Normaly you get "grub>" prompt.

Quote:
Originally Posted by diwakars View Post
2. How to recover my system in this scenario??
Reinstalling grub.
Or creating a configfile.

Quote:
Originally Posted by diwakars View Post
3. Does 512 bytes of the boot loader gets deleted??
No

Quote:
Originally Posted by diwakars View Post
4. Is there any other method to recover my system??
See your question 2
 
  


Reply



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
Why /boot/grub/grub.conf is symlinked to /boot/grub/menu.lst raj_hcl1986@rediffma Linux - Newbie 2 10-19-2008 02:19 AM
Problems with /boot/grub/grub.conf not being read properly on reboots cmeyer Linux - Software 1 10-11-2008 06:34 PM
GRUB menu.lst/grub.conf file with multiple partitions dasy2k1 Linux - General 1 04-19-2007 08:42 AM
how to configur grub.conf file for dual boot? den-den Linux - General 2 08-23-2005 02:49 PM
reinstalling windows deleted my grub master boot file; how do I restore it? sohmc Linux - General 3 01-12-2005 01:27 PM

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

All times are GMT -5. The time now is 05:23 AM.

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
Open Source Consulting | Domain Registration