LinuxQuestions.org
Visit Jeremy's Blog.
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 05-03-2005, 06:32 PM   #1
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Rep: Reputation: 31
another grub question!


I'm having major sound issues with fedora 3.0 and decided to give another distro a try. before installing i would like to know how to edit grub to make sure that i will have a triple boot ( xp, fedora 3.0 and/or Centos 4.0) i read a few threads and they all talk about editing the grub.conf file and add the new distro. I would like to know that if i decide to install a third distro and choose not to install grub during installation but rather edit my existing grub.conf file, how do i obtain the information needed to be added so that my new distro will appear in the boot menu. by information i mean the kernel info, exact title, etc.
i read in a thread a method that seems pretty simple, just write the information in my current grub.conf file , install the third distro and allow it to install grub during installation, then go and add the information i wrote down so that it will appear in the boot menu. has anyone ever done this? thanks in advance
 
Old 05-03-2005, 06:57 PM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
First you need to post your grub.conf (or menu.lst in some cases) file over here so that we can look at your disk geometry.

Second you need to know the exact kernel file name and initrd (if present) from your /boot directory. It is possible that you may have more than one kernel so you should know which one you exactly you want to use. For every kernel type there can be an entry in your grub.conf file.

Post your grub.conf here and the exact file names and we can go from there...

grub recognizes disk geometry little different than disk partitioning programs.

hd0 - first IDE hard drive
hd1 - second IDE hard drive

hd0,0 means first partition on first disk

hd1,1 means second partition on second disk

Hope this helps,

Tux
 
Old 05-03-2005, 07:02 PM   #3
beagle2
Member
 
Registered: Aug 2004
Location: Aberdeen Scotland
Distribution: elive,sidux,xp,pclinuxos super gamer, mandriva 2007
Posts: 417

Rep: Reputation: 30
Yup thats the easy way, if your last install doesnt pick up your existing distros just copy over the info. Heres mine with xp and yoper :-
title=Yoper

root=(hd0,6)
kernel=(hd0,6)/boot/yos root=/dev/hda7 vga=791 splash=silent
initrd=/boot/initrd-2.6.8.1-3.img

title Windows
rootnoverify (hd0,0)
chainloader +1

and xp/yoper/kanotix

title Debian GNU/Linux, kernel 2.6.11-kanotix-7
root (hd0,7)
kernel /boot/vmlinuz-2.6.11-kanotix-7 root=/dev/hda8 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=0x317
initrd /boot/initrd.img-2.6.11-kanotix-7

title Yoper
root (hd0,6)
kernel (hd0,6)/boot/yos root=/dev/hda7 vga=791 splash=silent
initrd /boot/initrd-2.6.8.1-3.img


title Windows
rootnoverify (hd0,0)
chainloader +1
 
Old 05-03-2005, 07:06 PM   #4
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
thanks for the reply tux
below is my grub.conf file:

# 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,1)
# kernel /vmlinuz-version ro root=/dev/hdb5
# initrd /initrd-version.img
#boot=/dev/hdb
default=0
timeout=15
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.14_FC3smp)
root (hd0,1)
kernel /vmlinuz-2.6.11-1.14_FC3smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.14_FC3smp.img
title Fedora Core (2.6.11-1.14_FC3)
root (hd0,1)
kernel /vmlinuz-2.6.11-1.14_FC3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.14_FC3.img
title Fedora Core (2.6.10-1.770_FC3smp)
root (hd0,1)
kernel /vmlinuz-2.6.10-1.770_FC3smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.10-1.770_FC3smp.img
title Fedora Core (2.6.10-1.770_FC3)
root (hd0,1)
kernel /vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.10-1.770_FC3.img
title Fedora Core (2.6.9-1.667smp)
root (hd0,1)
kernel /vmlinuz-2.6.9-1.667smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667smp.img
title Fedora Core-up (2.6.9-1.667)
root (hd0,1)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667.img
title Other
rootnoverify (hd0,0)
chainloader +1


what i want to do is install Centos and then edit the above listed file. Im pretty sure that if i install Centos without installing grub, it wont appear on my boot menu list untill i add it to it. My question is do i create a brand new /boot partition for Centos? and how do i get the information for Centos such as exact kernel, image, title, since I wont be able to boot into Centos until it is added to grub.conf file? thanks in advacne for your help
 
Old 05-03-2005, 07:17 PM   #5
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
You dont have to create a seperate boot partition for Centos...the installer will take care of it.

Here's what I do...
If I install a new OS without touching the grub then after the install I enter my already installed Linux. Mount the partition (in your case Centos) on to a directory and then find out the exact kernel file and initrd.

then i just edit grub.conf based on that and reboot and if everything goes well...you will able to boot into Centos.

Tux
 
Old 05-03-2005, 07:27 PM   #6
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
so i should a create a partition like "centos" for example
then boot into fedora and mount the /boot partition onto the newly created partition(centos) and retrieve the info needed and add it to grub.conf?
 
Old 05-03-2005, 07:55 PM   #7
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
I assume you have free space on the hard drive to install Centos. All you do is to install Centos in the free space...then boot into fedora. Become root and mount the partition on which you installed centos.

You would do something like this to boot

# mount -t file-system-type -o rw /dev/hdXY /your-preferred-mount-point

where,
X should be replaced with the harddrive used like a or b
Y should be replaced with the partition number on the harddrive

Edit: the /boot partition of Centos would be inside you root partition of Centos. You cannot mount a particular directory from a different partition...you have to mount the whole partition to access a particular directory in that partition.

Last edited by tuxrules; 05-03-2005 at 08:13 PM.
 
Old 05-03-2005, 08:42 PM   #8
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
thanks for the help, i think i have an idea of how to proceed. install Centos then
mkdir /mnt/centos
mount /dev/hdxy /mnt/centos

where xy is the root directory of Centos, access the boot directory and copy the info needed. i'll give it a try, see how it goes
 
Old 05-03-2005, 09:59 PM   #9
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
hey tux, i installed Centos and created a /mnt/centos directory.
logged into fedora and mounted my centos directory and looked in /boot but there is no info there, its empty. can you tell me where to look for kernel info, title, initr etc, so i can edit my grug.conf file in fedora to be able to boot into centos, thanks in advance
 
Old 05-04-2005, 12:01 AM   #10
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
i found three kernels

/mnt/centos/usr/src/kernels/2.6.9-5.0.3.EL-hugemem-i686
/mnt/centos/usr/src/kernels/2.6.9-5.0.3.EL-i686
/mnt/centos/usr/src/kernels/2.6.9-5.0.3.EL-smp-i686

the root directory for centos is /hdb8

is this correct?

title Centos 4.0
root (hd0,8)
kernel 2-6-9-5.0.3

initrd= no idea what to put here?? any suggestions, thanks
 
Old 05-04-2005, 12:06 AM   #11
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
I am little confused by what you posted...let me know if what i've understood is right?

You installed Centos in the free space and rebooted...and selected to boot into fedora.

In fedora you made a directory centos in /mnt

then you used mount command to mount the centos partition in /mnt/centos...

then you cd to /mnt/centos/boot and you don't see anything there...no kernel files and no initrd...strange!!!

I should tell you I am not aware of how Centos installs but its RPM distro mostly based on Redhat so it mostly likely follows redhat/fedora norms.

If you've done what I stated above and don't find anything I suggest you check out some directories in the root structure of centos partition...

Tux,
 
Old 05-04-2005, 12:15 AM   #12
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
The best way to add an entry to grub.conf is to follow the existing entries in your grub.conf

it would be something like this...

title Centos
root (hd1,7)
kernel /vmlinuz-2-6-9-5.0.3 ro root=/dev/hdb8


Quote:
the root directory for centos is /hdb8
is this correct?

title Centos 4.0
root (hd0,8)
kernel 2-6-9-5.0.3
grub recognizes the partition a little differently than hard disk geometry...

the first hard drive is hd0 and second one is hd1
while the partition start from zero and not one...

hence your root partition for centos would be (hd1,7)...you can skip initrd if its not there
 
Old 05-04-2005, 09:40 AM   #13
mkoljack
Member
 
Registered: Jan 2005
Location: Chicago
Distribution: Fedora Core 4, Suse 9.3
Posts: 186

Rep: Reputation: 30
Also doing 3rd OS

Hi Tuxrules--

I did not see this thread and started a new one in the general forum. Tux I see you have experience with this. Is it possible to take a look at the thread I started? Any comments you offer would be great.

http://www.linuxquestions.org/questi...31#post1625031

Thank you for your time and help.

Mark
 
Old 05-04-2005, 07:03 PM   #14
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
hey tux,
i made the changes to the grub.conf file and im getting the following error

"error 21 file disk does not exist"

title Fedora Core (2.6.10-1.770_FC3smp)
root (hd0,1)
kernel /vmlinuz-2.6.10-1.770_FC3smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.10-1.770_FC3smp.img
title Fedora Core (2.6.10-1.770_FC3)
root (hd0,1)
kernel /vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.10-1.770_FC3.img
title Fedora Core (2.6.9-1.667smp)
root (hd0,1)
kernel /vmlinuz-2.6.9-1.667smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667smp.img
title Fedora Core-up (2.6.9-1.667)
root (hd0,1)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667.img
title Other
rootnoverify (hd0,0)
chainloader +1

title Centos
root (hd1,8)
kernel /vmlinuz-2-6-9-5.0.3 ro root=/dev/hdb8

i tried hd1,7 and then tried hd1,8 im guess im doing somethig wrong. do you have any more suggestions??
 
Old 05-04-2005, 08:04 PM   #15
LDZ420
LQ Newbie
 
Registered: Apr 2004
Location: Fontana, California
Distribution: Ubuntu
Posts: 27
Blog Entries: 1

Rep: Reputation: 15
I have a simple question but it's just for clarification.

Is the installation of Centos on a different hard drive than the fedora distro?
Or is it just on a different partition? The reason that i ask is because the other distros are on the hd0. This tells me that they are on hd0. This tells me that they are on the first hard drive ide controller.

The way that it seems to me is that you are trying to put it on the second controller (hd1) oh either the 7th or 8th partition.

Please could you clear this up for me I am having a hard time following and I am also a newbie trying to learn.

-Landon
 
  


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
grub question kpachopoulos Fedora 1 09-05-2005 11:39 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM
Grub Question ZingSter Linux - Software 4 10-04-2004 05:09 PM
Grub Question FedoraFan Fedora 1 10-03-2004 08:17 PM
A GRUB question... concoran Linux - General 15 04-27-2003 06:28 PM

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

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