LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-16-2004, 11:06 AM   #1
izac5
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Rep: Reputation: 0
Can't find edit grub.conf when im in command line.


Hi there. I'm new to linux so i guess im in the right place. I created an image of linux and then restored it on to a second hard drive. It is now my job to get it working. I've disconnected the first hard drive. The second hard drive won;t boot however. I can only assume i need to modify the grub file to point to the correct device for booting.

I'm using the partimage rescue cd to get into the command line.

I then mount the boot drive and can't find grub.conf in /boot/grub/

I've also mounted the /etc/ directory on the main drive but i still can't locatred it.

What am i doing wrong?
 
Old 11-16-2004, 11:16 AM   #2
Louis_Carole
Member
 
Registered: Feb 2004
Location: Oxford, OH
Distribution: LFS 5.1.1, Slackware 9.1
Posts: 94

Rep: Reputation: 15
Dear Izac,

Which partition is grub expecting grub.conf to be in? If it's looking for the original hard drive, or a partition therein not labeled the same as that in the new hard drive, it won't find it.

- Ben
 
Old 11-16-2004, 11:23 AM   #3
izac5
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Ah from what i can understand its looking for the hard drive at hd 0,0 and i need to change it to hd 1,0 which is the new hard drive.


I want to be able to disconnect the first hard drive and have the second hard drive boot up by itself.


I've created the boot and main and swap partitions and restored the image that i created from the first hard drive on to them.
 
Old 11-16-2004, 11:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
What distribution are you running?

You just need to install the bootloader to the second drive. Assuming that the second drive is now in the same location as the first. If not you will need to modify the /etc/fstab to reflect the different device ID i.e. hdx (or sdx) of the new drive in addition to the bootloader configuration file.

The file your looking for is actually /boot/grub/menu.lst and not grub.conf. There are a few distros like Redhat that uses /etc/grub.conf file. In this case the menu.lst is a link that points to grub.conf.

grub-install --root-directory=/mnt/x /dev/hda

Where x is the directory where you mounted the root directory.

http://www.gnu.org/software/grub/man...20grub-install

Assuming your really using grub. If using lilo then its /etc/lilo.conf.

Last edited by michaelk; 11-16-2004 at 11:43 AM.
 
Old 11-16-2004, 11:54 AM   #5
izac5
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for the speediness of your reply. Im using RED HAT Linux 9. I've found the menu.lst file and it appears to be some kind of shortcut when i click on it i stay in the same directory whis is /boot/grub/. I still can't find grub.conf after i click on it. i can find a file thats called grub.conf.sample but not the actual grub.conf file.

I know the file is there cause i have booted into linux when using the first hard drive(as a test) and I can find there. I can only assume im monting something wrong. I can't even fidn the grub.conf when i look in the command line on the first hard drive.
 
Old 11-16-2004, 03:26 PM   #6
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
RH puts it in /etc/grub.conf

vi /etc/grub.conf gets me there everytime.
 
Old 11-16-2004, 04:05 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
If you boot the 1st install CD and select rescue mode. Your root partition will be mounted at /mnt/sysimage
So run the commands
chroot /mnt/sysimage

You can use the vi editor to change the /etc/grub.conf file and the /etc/fstab file.

Then
grub-install /dev/hdx

Where hdx is the location of the "new drive"
 
Old 11-16-2004, 04:24 PM   #8
izac5
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks i was able to get in under the first hard drive as a test. Now second hard drive died on me so I gotta RMA it. Thanks again for the help.
 
  


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
Edit the Grub.conf reply2vinay Linux - Hardware 1 07-26-2005 09:38 AM
How to edit grub.conf? zeroz52 Linux - Newbie 27 03-02-2005 12:58 PM
Changing resolution in FC3. Which xorg.conf line do I edit? ColKurtz Linux - Newbie 2 02-18-2005 12:09 PM
[SOLVED] How to edit grub.conf filosophem Red Hat 4 02-07-2004 03:04 AM
Edit grub.conf NoviceW Linux - General 1 11-11-2003 05:51 PM

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

All times are GMT -5. The time now is 01:28 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
Open Source Consulting | Domain Registration