LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-12-2006, 03:39 PM   #1
wtilton
LQ Newbie
 
Registered: Jul 2006
Posts: 13

Rep: Reputation: 0
Post Dual Booting CentOS and Redhat


I'm a Linux noob, but have been tasked with installing CentOS on a machine that has an existing Redhat installation. The Redhat installation is install on the master drive, and I'm wanting to install CentOS on the slave drive (two seperate drives).

I loaded up CentOS and went through the installation. Now the GRUB loader thingy only displays CentOS as a boot option. Where'd Redhat go? I'm guessing that CentOS didn't know that Redhat was on there, so it just put it's own entry into the GRUB loader. Any easy way to get that back? I'm not really sure where the other one was loaded, but I'm guessing dev/hda2.

Thanks in advance,

WTilton
 
Old 07-13-2006, 06:43 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I am guessing RH is still there and that GRUB just doesn't have it in its configuration file.

I would boot into CentOS and use one of its partitioning tools to see what partitions are on the two disks. If you have fdisk, running
Code:
fdisk -l
as root will list all of the partitions on both disks. Otherwise, see what partioning tools you have using
Code:
man -k partition
Compare this against the partitions that are currently mounted (issue the mount command w/o any parameters). I am guessing you will see one or more partitions on your slave drive (partitions that start with /dev/hdb) mounted and none mounted from your master drive (partitions that start with /dev/hda).

If this is true, create a temporary mount point (say /mnt/temp) if you do not already have one, and see if you can mount any of the partitions from your master drive on it with commands like:
Code:
mount -t auto /dev/hda1 /mnt/temp
These commands need to be run as root. If you can mount any of these, look at their content with
Code:
ls /mnt/temp
This should tell you whether your RH system is still there. If it is, you just need to modify you GRUB configuration file to give you a choice of which to boot.
 
Old 07-13-2006, 11:43 AM   #3
wtilton
LQ Newbie
 
Registered: Jul 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Smile

Thanks Blackhole. I'll give this stuff a try now. I did try adding an entry to the GRUB loader, but when I tried to boot from it it didn't work. Let me try the stuff you've outlined and I'll get back to you.
 
Old 07-13-2006, 12:01 PM   #4
wtilton
LQ Newbie
 
Registered: Jul 2006
Posts: 13

Original Poster
Rep: Reputation: 0
My primary drive looks like the following: ("fdisk -l" worked like a charm)

Device Boot ... System
/dev/hda1 ... Linux
/dev/hda2 ... Linux
/dev/hda3 ... Linux swap

and slave drive:

/dev/hdb1 ... Linux
/dev/hdb2 ... Linux LVM

I did the mount command on 1 and 2 on the primary. Both of them had what I think is the Redhat OS.

hda1 has folders grub, and lost+found, and then files like boot.b, chain.b ... initrd.2.4.20-6.img, kernel.h etc.
hda2 has folders like bin, boot, dev, etc, home, initrd, lib...

I'm going to totally guess and say I need to get grub to point to the hda1 drive to boot from that. It does look like there is a grub folder in the primary disk. Going to now lookup how to modify the GRUB stuff.

Thanks again!
 
Old 07-13-2006, 12:22 PM   #5
wtilton
LQ Newbie
 
Registered: Jul 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Woot! Got it working. I went into the mounted directory grub and looked at it's grub.conf and simply copy and pasted the existing entry over. Rebooted, selected RedHat 9, and up she came. Awesome!

for reference my /boot/grub/grub.conf file looks like:

title CentOS (2.6.9-34.EL)
root (hd1,0)
kernel /vmlinuz-2.6.9-34.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-34.EL.img
title Red Hat Linux (2.4.20-6)
root (hd0,0)
kernel /vmlinuz-2.4.20-6 ro root=LABEL=/
initrd /initrd-2.4.20-6.img

Thanks again for taking the time to help out. Much appreciated!

Last question...any reason why it started booting from the slave drive's grub.conf instead of the old one that RedHat 9 already had? Should I be concerned that it's booting from the slave?
 
Old 07-13-2006, 10:32 PM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by wtilton
Last question...any reason why it started booting from the slave drive's grub.conf instead of the old one that RedHat 9 already had? Should I be concerned that it's booting from the slave?
True confession time. I am glad you got it working on your own because, while I am familiar with LILO, I have never used GRUB! So I am somewhat guessing here. When you installed centOS, it put instructions on the MBR (Master Boot Record -- the first 512 bytes of /dev/hda) to run GRUB from /dev/hdb. If this bothers you, I would think you could boot RH, setup its GRUB config file and give the magic instruction (this is where I have no idea what I am talking about) to have it set up the MBR to use its version of GRUB. Or ... you can always go with the old adage: if it ain't broke, don't fix it!
 
Old 07-14-2006, 11:50 AM   #7
wtilton
LQ Newbie
 
Registered: Jul 2006
Posts: 13

Original Poster
Rep: Reputation: 0
No you were pretty much right on. You pointed me in the right direction and I got it done.

Yeah, probably just going to let it stay as it is. It's working so why bother fooling with RH the MBR. Thanks again.
 
  


Reply

Tags
boot, centos4, dual, grub, redhat9


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
dual booting xp mandrake/redhat two hd theo400 Linux - Software 2 12-07-2006 05:41 AM
Dual booting CentOS 4.2 with FC4 Digital Surgeon Fedora - Installation 5 01-12-2006 10:01 AM
Dual booting xp and redhat? statickrypt Linux - Newbie 3 12-07-2003 09:37 PM
Dual Booting w/ RedHat and XP LovinLinux Linux - Software 10 11-13-2003 11:02 PM
help! dual booting with redhat 7.3 and XP s.n. Linux - Newbie 1 12-14-2002 10:15 PM


All times are GMT -5. The time now is 03:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration