LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2006, 08:02 PM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
How does grub choose a conf file if there is one on both hda and hdb?


hi. I have fc3 on hda and ubuntu on hdb. FC3 has been on there for awhile and ubuntu is newer. When i installed ubuntu i reinstalled grub to the mbr. Now im going to take the drive with ubuntu out of the system and replace it with a bigger drive. Will grub automatically find the other conf file in FC3? Do i need to reinstall grub from the FC3 drive sot hat it will use that conf file? Can i change which config file it uses by dropping to the command line in grub at startup? Im worried that i'll make it difficult to boot up into FC3 if i just swap out the drive. Thanks for any replies in advance, i appreciate them.
 
Old 03-18-2006, 08:16 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I would make the grub change before even removing the drive. When you type grub, statement, root (hd0,0) tells grub to look in /dev/hda1 for the grub.conf file. The statement, setup (hd0) tells grub to load the mbr of /dev/hda ( your first drive )

For example:
Code:
grub>
      root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub>
      setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 d (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stag
e2 /boot/grub/grub.conf"... succeeded
Done.

grub> quit

Last edited by homey; 03-18-2006 at 08:17 PM.
 
Old 03-18-2006, 08:31 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,249

Rep: Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156
"Will grub automatically find the other conf file in FC3?"
nope - loader code is very dumb. Not much smarts will fit in the space available in the MBR.
"Do i need to reinstall grub from the FC3 drive sot hat it will use that conf file?"
yep
"Can i change which config file it uses by dropping to the command line in grub at startup?"
yep - should work, although I haven't tried it with the initial install drive physically missing.
"Im worried that i'll make it difficult to boot up into FC3 if i just swap out the drive."
Well founded concern - see homeys post above.
 
Old 03-18-2006, 08:54 PM   #4
tamoneya
Member
 
Registered: Jan 2005
Location: MA
Distribution: Ubuntu 7.10
Posts: 558

Rep: Reputation: 31
right now it seems to me as if you have grub installed on the MBR of both drives. The only one that will work at this point is the one on the master hdd and it will use the grub.conf on the master hdd. It is this grub.conf that should be edited to include the other OS (hd1,0) probably
 
Old 03-18-2006, 09:10 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,249

Rep: Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156
Quote:
Originally Posted by tamoneya
and it will use the grub.conf on the master hdd.
Not true.
The loader code is aware of which drive has the stage/conf files. It doesn't need to be the master - probably usually is, but not required.
 
  


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
/dev/hda under lilo.conf even thoug my HD is under /dev/hdb Basel Slackware 8 10-27-2005 06:00 PM
Grub troubles. Moving linux from hda to hdb Zarneth Linux - General 3 06-29-2005 04:57 PM
Where do I put Grub? hda (XP) or hdb(FC2)? TimDog Fedora - Installation 1 10-04-2004 05:56 PM
Trying to uninstall Grub, Win2000 on HdA; RH9 on HdB? jlbincr Linux - General 4 02-21-2004 10:48 AM
[HELP] GRUB problems!!! (WindowsXP-hda / RedHat8.0-hdb) jpsrm Linux - General 7 01-08-2003 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:55 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