?
Solved

How to install both 32-bit and 64-bit Red Hat Enterprise Linux on one 64-bit machine

Posted on 2005-05-15
18
Medium Priority
?
878 Views
Last Modified: 2013-12-15
I have a 64-bit computer using AMD Opteron 64-bit processor. I have installed 64-bit Red Hat Enterprise Linux on it. The operating system can run on the machine very successfully. Now I want to have a 32-bit Red Hat Enterprise Linux to co-exist on the machine. How do I do it? Because this computer has two SCSI hard drive, I try to intall the 32-bit RHEL on the hard drive 2 (64-bit RHEL has been intalled on the hard drive 1), but the bootloader GRUB only find my 32-bit RHEL. I use df command, it only find hard drive 2. But I know hard drive 1 is there and everything on hard drive 1 is intact.

Can someone tell me how to do it? How to configure GRUB? And how about to install both 32-bit and 64-bit RHEL on single hard drive? Thank you.
0
Comment
Question by:tty2004
  • 7
  • 6
  • 5
18 Comments
 
LVL 6

Assisted Solution

by:knollbert
knollbert earned 750 total points
ID: 14010061
can you show your /boot/grub.conf?

On reboot press "e" when you reach grub

modify   anything that shows (hd1,0) to (hd0,0)
    Grub does have tab completion to make sure that they are correct options
0
 

Author Comment

by:tty2004
ID: 14014845
The is /boot/grub/grub.conf in 64-bit RHEL
# 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 (hd1,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sdb1
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title RH Enterprise Linux WS 32-bit (2.4.21-20.ELsmp)
        root (hd1,0)
        kernel /boot/vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/1
        initrd /boot/initrd-2.4.21-20.ELsmp.img
title RH Enterprise Linux WS 32-bit-up (2.4.21-20.EL)
        root (hd1,0)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/1
        initrd /boot/initrd-2.4.21-20.EL.img
title RH Enterprise Linux WS 64-bit
        root (hd0,0)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/
        initrd /boot/initrd-2.4.21-20.EL.img
        chainloader +1

This is /boot/grub/grub.conf in 32-bit RHEL
# 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,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux WS (2.4.21-20.ELsmp)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/
        initrd /initrd-2.4.21-20.ELsmp.img
title Red Hat Enterprise Linux WS-up (2.4.21-20.EL)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/
        initrd /initrd-2.4.21-20.EL.img

Now I can only boot into 32-bit RHEL. How to modify the grub configuration file?
0
 
LVL 6

Expert Comment

by:knollbert
ID: 14014990
try adding
title RH Enterprise Linux WS 64-bit
        root (hd0,0)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/
        initrd /boot/initrd-2.4.21-20.EL.img
        chainloader +1
to your 32-bit grub
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:knollbert
ID: 14015036
on review

Are you sure you labeled the files correctly in your response?

0
 
LVL 6

Expert Comment

by:knollbert
ID: 14015050
easier method yet
Switch harddrive that you boot from
0
 

Author Comment

by:tty2004
ID: 14015103
Yes, I think I may label the wrong files. It doesn't look right. Right now the Linux computer is not with me, so I will check it tomorrow. But suppose we swtich the label of the grub files, is that possible to figure out the problem without opeing my computer.
0
 
LVL 6

Expert Comment

by:knollbert
ID: 14015110
actually changing
 the boot order in the bios should work
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 750 total points
ID: 14016099
> how about to install both 32-bit and 64-bit RHEL on single hard drive?
When you install 64bit RHEL, choose "compatilbe arch ....." to make x86_64 kernel can run
32bit application.

Also, you can try to intall
rpm -ivh kernel-smp-2.4.21-20.EL.i686.rpm
in 64bit RHEL, then it will add the entry in /boot/grub/grub.conf so you can
choose to boot up the 32bit kernel or 64bit kernel.
So you don't need to install another entire 32bit OS.
0
 

Author Comment

by:tty2004
ID: 14032726
Setting the boot order in the bios doesn't work for me. But changing the setting in /boot/grub/grub.conf is a correct thought for fixing the problem. This is a modified grub.conf file which finds the 64bit RHEL on my first hard disk.

The is /boot/grub/grub.conf in 32-bit RHEL
# 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 (hd1,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sdb1
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title RH Enterprise Linux WS 32-bit (2.4.21-20.ELsmp)
        root (hd1,0)
        kernel /boot/vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/1
        initrd /boot/initrd-2.4.21-20.ELsmp.img
title RH Enterprise Linux WS 32-bit-up (2.4.21-20.EL)
        root (hd1,0)
        kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/1
        initrd /boot/initrd-2.4.21-20.EL.img
title RH Enterprise Linux WS 64-bit
        root (hd0,0)
        kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/
        initrd /initrd-2.4.21-20.ELsmp.img


As for installing both 32-bit and 64-bit RHEL on a single hard drive, I don't remember there is an option "compatilbe arch ....." when I install 64bit RHEL. Could you tell me this option comes out in which step? And where to find kernel-smp-2.4.21-20.EL.i686.rpm? Thank you.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 14036904
When you install, you choose "custom" for the packages installation instead of "default" or "Server".
Then the next screen will go to the packages check list to allow you to choose which packages you want to install.
0
 

Author Comment

by:tty2004
ID: 14038650
how about the /bin directory.  I can only have either 32-bit or 64-bit files under /bin. how to make them co-exit?
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 14038733
32bit and 64bin are most related to the system libraries.
The system files and library files are in separate directories.
0
 

Author Comment

by:tty2004
ID: 14039397
how could that be possible for Linux has two /bin directory under the root /? do you mean it will have /bin1 for 32 bit system files and /bin2 for 64 bit system files? Could you explain me more? Thanks.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 14040099
Most of the binary executable files are 64bit such as "/bin/ls", "/bin/bash".
The 32bit compatible means that 32bit application/binary can run on it since there are both 32bit and 64bit system libraries,
especially the run-time library.
There is no separate /bin or /usr/bin.
0
 

Author Comment

by:tty2004
ID: 14043144
But if I was in 32-bit Linux, but my /bin/ls or /bin/bash are 64-bit, how can I run 64-bit appliation in 32-bit mode?
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 14047039
> how can I run 64-bit appliation in 32-bit mode?
It depends on the application.
Please keep in mind, 32bit compatible is for the 32bit application to run on 64bit OS.
Not 64bit application runs on 32bit OS (I don't think you can).
Besides, there is nothing to do with /bin/ls or /bin/bash.
Only matter is the run-time library.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 14047080
When you do
file /bin/ls
you will see /bin/ls is 64bit since it is compiled in 64bit OS.
But the source code of /bin/ls is the same.
When it is compiled on 32bit OS, then it is 32bit. If it is compiled on 64bit, then it is 64bit.

You can do
ldd /bin/su
to see which runtime libraries are needed for /bin/su.
That's important and matter for appliaction to run on the OS.
0
 

Author Comment

by:tty2004
ID: 14049571
Actually, I do need entire 32-bit OS. So the way you recommended is good, but not exactly what I need.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month9 days, 20 hours left to enroll

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question