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 - 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 10-31-2011, 10:29 AM   #1
bechkam7
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Question Cannot install Rhel5.5 and Rhel 6 on same machine -- HELP PLEASE !!!!!!


Hi All,

I am new in linux. Stuck in a issue. Please help me.

I have already installed windoows 2008 R2 on the system. (/dev/sda1)
I have installed RHEL 5 in /dev/sda3 AND rhel 6 on /dev/sda6
I cannot install RHEL 5 and RHEL 6 on same machine. Following are the steps i did.

1. Installed RHEL 5 first and then RHEL 6.

While installing RHEL 6, I overwrite the MBR for Rhel 5.
I added entry for Rhel 5 while creating the grub during installation in Rhel 6. I mentioned the partition on which Rhel 5 was installed i.e. /dev/sda3
After successfully installing Rhel 6. When I tried to boot up in RHEL 5 from grub following error message was shown
"error 13 invalid unsupported executable format"

Following is the grub.conf file
[root@localhost ~]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,5)
# kernel /boot/vmlinuz-version ro root=/dev/sda6
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.32-71.el6.x86_64)
root (hd0,5)
kernel /boot/vmlinuz-2.6.32-71.el6.x86_64 ro root=UUID=d7f6cd43-646a-4c0f-8f15-5ea72583e6b5 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M rhgb quiet
initrd /boot/initramfs-2.6.32-71.el6.x86_64.img
title rhel 5
rootnoverify (hd0,2)
chainloader +1
title Other
rootnoverify (hd0,0)
chainloader +1

I mounted the rhel 5 /dev/sda3 partition in RHEL 6. Checked the files are present in /boot folder. They were present.
Then I copied the rhel 5 grub.conf's ENTRY into Rhel 6 grub.conf.
This was the updated grub.conf file

[root@localhost ~]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,5)
# kernel /boot/vmlinuz-version ro root=/dev/sda6
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.32-71.el6.x86_64)
root (hd0,5)
kernel /boot/vmlinuz-2.6.32-71.el6.x86_64 ro root=UUID=d7f6cd43-646a-4c0f-8f15-5ea72583e6b5 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M rhgb quiet
initrd /boot/initramfs-2.6.32-71.el6.x86_64.img
title rhel 5
root (hd0,2)
kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/1 rhgb quiet crashkernel=128M@16M
initrd /boot/initrd-2.6.18-194.el5.img
title Other
rootnoverify (hd0,0)
chainloader +1

STILL same error message was shown.

2. I installed Rhel 6 first and then RHEL 5.
While trying to boot Rhel 6 following error message was shown
"error 2 bad file or directory type"
I booted the system in RHEL 5 and again did all the things mentioned before. Still no output.

PLEASE can anybody help me out from this.

Thanks a lot
 
Old 10-31-2011, 10:06 PM   #2
bryan641
Member
 
Registered: Mar 2011
Location: Ohio, USA
Distribution: Debian Stretch
Posts: 43

Rep: Reputation: 14
Ok, I'll start with a disclaimer that I use Debian rather than RHEL, and I've not tried multiple versions of linux on the same HD before.

However, I think what you need to do is install grub for RHEL 5 on that partition (/dev/sda3) and grub for RHEL 6 on that partition (/dev/sda6).

Last time I had a grub error I was able to run my install disk up to the point where it installed grub on the partition, then aborted the install process and everything else was left intact. (If you do this, make sure you don't let it change your partitions or format them again, unless you don't mind completely reinstalling the whole thing.)

--Bryan
 
Old 11-01-2011, 03:29 AM   #3
bechkam7
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Hey guys I finally got the solution.
Its pretty easy.
Install grub in MBR for RHEL 6.
Don't install any grub for RHEL 5. Skip the step.

Manually add the RHEL 5 entry in Rhel 6's /etc/grub.conf

And it works

Thanks,
beckham7
 
  


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
How do I partition and install RHEL and WinXP on same machine? Ihorlaitan Linux - Newbie 2 01-04-2011 09:42 AM
Can't install RHEL5.4 on P4 machine abhijit.karkhanis Linux - Software 8 12-11-2010 03:16 AM
How to Install RH AS4 and RHEL 5 on the same machine having options at boot time? masquerade Red Hat 2 01-20-2009 04:33 AM
Unable to install Virtual Machine In Rhel5 with Virt-manager with CD-Rom Source prasun_mitra Linux - Enterprise 0 08-30-2007 03:03 AM
Install Oracle Rac on RHEL 4 on a Dell machine masand Linux - Enterprise 0 01-16-2006 01:00 AM

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

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