Linux Admin Reference – 32bit mode vs 64bit mode – Redhat Enterprise Linux
Other Learning Articles that you may like to read
Free Courses We Offer
Paid Training Courses we Offer
There are two primary modes of operation of the microprocessor architecture: Long mode (lm) and Legacy mode. Long mode is used by 64-bit operating systems. It combines the processor’s native 64-bit mode and a 32-bit/16-bit compatibility mode. Under this mode, 64-bit, 32-bit and 16-bit applications may be supported. Legacy mode is only used by 16-bit and 32-bit operating systems.
A bit is short for “binary digit.” It is basically how a computer stores references data, memory, etc. By using 32 bits your processor can represent numbers from 0 to 4,294,967,295 while a 64-bit machine can represent numbers from 0 to 18,446,744,073,709,551,615. Essentially this means your computer will calculate larger numbers more effectively with 64-bit processing.
To determine if its a 64-bit capable CPU, run the following command:
# grep lm /proc/cpuinfo
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm
The above output shows a CPU that has 64-bit mode support (look for the lm flag). If the command returns nothing, then the CPU is only capable of running 16-bit or 32-bit code.
There are many benefits in choosing the 64-bit version if you have the necessary hardware. For example the 32-bit version of Red Hat Enterprise Linux 5 will only address 16GB of RAM whereas the 64-bit version can address 256GB/1TB of RAM overall
Which Installation mode is good for your requirement?
Choosing the right installation comes down to your CPU specifications.
- If you have only have a 32-bit CPU then you can only install the 32-bit version.
- If you have a 64-bit CPU then you have the option of installing either version.
- In General, the 64-bit version can run 32-bit packages. But 32 bit version cannot run 64 bit packages
For Example :
- Red Hat Enterprise Linux (v. 5 for 32-bit x86)
- Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)
- Red Hat Enterprise Linux AS (v. 4 for 32-bit x86)
- Red Hat Enterprise Linux AS (v. 4 for 64-bit AMD64/Intel EM64T)
- Red Hat Enterprise Linux AS (v. 3 for 32-bit x86)
- Red Hat Enterprise Linux AS (v. 3 for 64-bit AMD64/Intel64 EM6T)
Note: Here we are only focussing about AMD64/Intel64 architecture, although we still have other architecture such as Itanium(64bit) and Power PC(64bit).
You can use uname command to find out the version of your system, for example:
A 32 bit system will show:
# uname -a
Linux myserver 2.6.18-92.el5xen #1 SMP Tue Apr 29 13:45:57 EDT 2008 i686 i686 i386 GNU/Linux
A 64 bit system will show:# uname -a
Linux myserver2 2.6.18-prep #1 SMP Mon Nov 30 16:10:48 CST 2009 x86_64 x86_64 x86_64 GNU/Linux
If you have installed the 32-bit version but you’re not sure if you have a 64-bit processor, you can run the command:
# cat /proc/cpuinfo
This will tell you detailed information about your processor including the model, located next to model name.
What are the different types of kernel packages in Red Hat Enterprise Linux?
As discussed earlier
- In 32-Bit OS, cannot install 64-bit packages.
- In 64-Bit OS, can install both 64-Bit packages and 32-Bit packages.
- Note: If the application is depends only on 32-Bit kernel or 32-Bit library’s then we have to reinstall the OS from 64-Bit to 32-Bit(which has to be the last option).
Red Hat Enterprise Linux contains the following kernel packages (some may not apply to your architecture, and not all are available in all major releases):
kernel – contains the kernel and following key features:
- Uniprocessor support (will utilize a single processor on multi-processor systems) (RHEL3,4,5)
- Multi-processor support for Intel EM64T systems (RHEL 3 only)
- 4GB RAM support on Intel and AMD x86 systems(1)
kernel-BOOT contains the installation kernel (x86 only)
kernel-{*-}devel (RHEL 4 and ongoing) – contains kernel header files replaces kernel-source
kernel-debug – contains the same kernel as kernel but with debugging options enabled (RHEL 5 only)
kernel-doc – contains kernel documentation , previously found in /usr/src/linux{-*}/Documentation
kernel-hugemem (i686 only) – in addition to the options of kernel-smp :
4GB/4GB split – ~4GB of virtual address space for kernel resources and ~4GB for each user processor. Should be utilized on systems/loads where more addressable kernel resources are required including greater than 16GB systems isn’t shipped in RHEL5 and above.
kernel-kdump (RHEL 6 only; POWER and s390x architectures only) – secondary kernel for kernel crash dump capture; cf.
kernel-largesmp (RHEL 4 only; 64-bit architectures only) – similar to kernel-smp, but with support for higher numbers of CPU on x86_64, Itanium2 and POWER; cf. W
kernel-PAE (RHEL 5 only; x86 only) – kernel with support for up to 16 Gb of RAM; cf.
kernel-rt-* (Red Hat Enterprise MRG Realtime) – realtime kernels
kernel-smp – in addition to the options of kernel (not shipped with RHEL6 and above:
- multi processor support (all architectures)
- PAE – Physical Address Extension (Intel x86 only) upto 16GB RAM(2)
kernel-pcmcia-cs (RHEL 3 only) – contains support for PCMCIA cards
kernel-source (RHEL 3 only) – contains complete source code for the Linux kernel
kernel-utils – contains utilities that can be used to control the kernel or system hardware
kernel-xenU – kernel used by paravirtualised guests (RHEL 4.5+)
kernel-xen – kernel which runs in Xen VM (RHEL 5 only)
- for X86 only
- supports up to 16 Gb of RAM in all installs if the processor allows it.
- supports a maximum of 16 CPUs
kernel-debug-* a version of the kernel compiled with additional debugging-related facilities. These make the kernels slower but sometimes aid problem diagnosis.
kernel-*-debuginfo an extract of the DWARF debugging data for any particular kernel build, which was generated by the compiler, for use by tools such as crash, systemtap, kgdb, and more.
Installing 32-bit libraries on 64-bit RHEL6
On RHEL5 x86_64, 32 bit libraries are installed automatically but in RHEL6 X86_64 32-bit libraries are not installed by default on Red Hat Enterprise Linux 6
There are different ways to install the 32-bit libraries in RHEL6
Way 1: Use kickstart to install the OS and explicitly list the architecture for the required libraries.
For example, in the %packages section of the kickstart file:
%packages
@Base
@Server Platform
glibc.i686
openldap.i686
Use a wildcard with an architecture — *.i686 — to install all 32-bit packages. There are some known conflicts with x86_64 packages, however, so they must be subtracted from the list. Fortunately, the known conflicts are already in a group so subtracting is easy.
%packages
@Base
@Server Platform
*.i686
-@Conflicts (Server)
After the installation completes, manually install the necessary packages with yum and explicitly list the architecture:
[root@localhost ~]# yum install glibc.i686
To automatically install multiple architectures for future package installations, edit /etc/yum.conf and set
multilib_policy=all
NOTE: some forums have suggested the following %pre script, but it does not work because the %pre script runs before Anaconda generates the /tmp/anaconda-yum.conf file, thus any changes made to the file in a %pre script will be lost.
%pre
echo “multilib_policy=all” >> /tmp/anaconda-yum.conf
How to install an i386 package with up2date on a x86_64 / EM64T system?
Some third party applications require 32 bit versions of libraries to be installed when running on 64 bit system. To install the latest version of the 32 bit package and automatically resolve dependencies, use the command:
# up2date -u [package-name] –arch=i386
For example:
# up2date -u xorg-x11-deprecated-libs –arch=i386
This would install the xorg-x11-deprecated-libs and associated 32 bit dependencies.
Issues related to Operating System Bit Modes
Issue 1: Error: sh: cryptapp.exe : /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
The /lib/ld-linux.so.2 library file comes with 32 bit version of “glibc” package in Red Hat Enterprise Linux 6. Only 64 bit version of “glibc” package is installed on the system.
Just to confirm the issue, just follow the procedure:
Step 1: Verify the version and architecture of Red Hat Enterprise Linux 6.
[root@example ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
[root@example ~]# uname -a
Linux myhost.mydomain n 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
Step 2: Verify the version and architecture of glibc package.
[root@example ~]# rpm -q glibc
glibc-2.12-1.47.el6.x86_64
Step 3: Verify the architecture of application.
[root@example ~]# file crypt.exe
cryptapp.exe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Step 4: Verify whether ld-linux.so.2 library file is present on the system or not.
# ls -l /lib/ld-linux.so.2
ls: cannot access /lib/ld-linux.so.2: No such file or directory
To Resolve the Issue:
Install the 32 bit version of glibc package on the system.
Use the following yum command to install the 32 bit version of glibc package on the system.
[root@example ~]# yum install glibc-<version>.i686
Note:
- The 32-bit packages are not installed by default on Red Hat Enterprise Linux 6 X86_64 bit system.
- This behavior can be changed by setting “multilib_policy=all” variable in /etc/yum.conf file. Which will enable multilib policy as a system-wide policy. All the 32 bit libraries are available in the channels.
Issue 2: 32bit library package fails on a 64bit system reporting “Error: Protected multilib versions:”
# yum install libXxf86vm.i686
Loaded plugins: downloadonly, product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
<:: Snip::>
Error: Protected multilib versions: libXxf86vm-1.1.2-2.el6.i686 != libXxf86vm-1.1.0-1.el6.x86_64
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
To diagnosis the issue:
Verify the version of the package that is being installed matches the already installed 64bit version using
# rpm -qa <package>
Check the above output against the version that is going to be installed with a yum install <package>.i686 command.
Per the error reported, the 32bit version being installed does not match the already installed 64bit version:
Error: Protected multilib versions: libXxf86vm-1.1.2-2.el6.i686 != libXxf86vm-1.1.0-1.el6.x86_64
To Resolve the issue:
Install the required 32bit application using the full version syntax so as to coincide with the already installed 64bit application.
Instead of using :
# yum install libXxf86vm.i686
Use the following syntax:
# yum install libXxf86vm.<version same as the installed 64bit revision>.i686
Issue 3: yum Error: Protected multilib versions: package.i686 != package.x86_64
We have recieved the Error on RHEL 6.1.x86_64 system while installing openldap-servers package.
[user@linuxserver]# yum install openldap-servers
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package openldap-servers.x86_64 0:2.4.19-15.el6_0.2 will be installed
–> Processing Dependency: openldap = 2.4.19-15.el6_0.2 for package: openldap-servers-2.4.19-15.el6_0.2.x86_64
–> Running transaction check
—> Package openldap.i686 0:2.4.19-15.el6_0.2 will be installed
–> Processing Dependency: libssl.so.10 for package: openldap-2.4.19-15.el6_0.2.i686
–> Processing Dependency: libcrypto.so.10 for package: openldap-2.4.19-15.el6_0.2.i686
–> Processing Dependency: libsasl2.so.2 for package: openldap-2.4.19-15.el6_0.2.i686
–> Running transaction check
—> Package cyrus-sasl-lib.i686 0:2.1.23-8.el6 will be installed
–> Processing Dependency: libdb-4.7.so for package: cyrus-sasl-lib-2.1.23-8.el6.i686
—> Package openssl.i686 0:1.0.0-4.el6_0.2 will be installed
–> Processing Dependency: libk5crypto.so.3(k5crypto_3_MIT) for package: openssl-1.0.0-4.el6_0.2.i686
–> Processing Dependency: libkrb5.so.3 for package: openssl-1.0.0-4.el6_0.2.i686
–> Processing Dependency: libgssapi_krb5.so.2 for package: openssl-1.0.0-4.el6_0.2.i686
–> Processing Dependency: libz.so.1 for package: openssl-1.0.0-4.el6_0.2.i686
–> Processing Dependency: libkrb5.so.3(krb5_3_MIT) for package: openssl-1.0.0-4.el6_0.2.i686
–> Processing Dependency: libcom_err.so.2 for package: openssl-1.0.0-4.el6_0.2.i686
–> Processing Dependency: libk5crypto.so.3 for package: openssl-1.0.0-4.el6_0.2.i686
–> Running transaction check
—> Package db4.i686 0:4.7.25-16.el6 will be installed
—> Package krb5-libs.i686 0:1.8.2-3.el6_0.7 will be installed
–> Processing Dependency: libkeyutils.so.1 for package: krb5-libs-1.8.2-3.el6_0.7.i686
–> Processing Dependency: libkeyutils.so.1(KEYUTILS_0.3) for package: krb5-libs-1.8.2-3.el6_0.7.i686
–> Processing Dependency: libselinux.so.1 for package: krb5-libs-1.8.2-3.el6_0.7.i686
—> Package libcom_err.i686 0:1.41.12-3.el6 will be installed
—> Package zlib.i686 0:1.2.3-25.el6 will be installed
–> Running transaction check
—> Package keyutils-libs.i686 0:1.4-1.el6 will be installed
—> Package libselinux.i686 0:2.0.94-2.el6 will be installed
–> Finished Dependency Resolution
Error: Protected multilib versions: openssl-1.0.0-4.el6_0.2.i686 != openssl-1.0.0-10.el6.x86_64
Error: Protected multilib versions: krb5-libs-1.8.2-3.el6_0.7.i686 != krb5-libs-1.9-9.el6.x86_64
Error: Protected multilib versions: libcom_err-1.41.12-3.el6.i686 != libcom_err-1.41.12-7.el6.x86_64
Error: Protected multilib versions: openldap-2.4.19-15.el6_0.2.i686 != openldap-2.4.23-15.el6.x86_64
Error: Protected multilib versions: libselinux-2.0.94-2.el6.i686 != libselinux-2.0.94-5.el6.x86_64
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
The error shows a version of the i686 package needing to be installed which is older than the x86_64 version.
To Diagnosis the Error, verify the packages installed on the system:
[user@host]# yum list krb5-libs
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Installed Packages
krb5-libs.x86_64 1.9-9.el6 @anaconda-RedHatEnterpriseLinux-201105101844.x86_64/6.1
Available Packages
krb5-libs.i686 1.8.2-3.el6_0.7 rhel-x86_64-server-6
Here we see that the x86_64 bit package is installed on the system and there is no i686 version on the system. This is true for each package listed in the yum error. yum options like –setopt=protected_multilib=false –skip-broken will not work in this case.
The reason this occurred is that yum looks for latest package versions of packages available in RHN;
Using krb5-libs as an example, krb5-libs-1.9-9.el6.x86_64 which is installed on the system is newer than krb5-libs-1.8.2-3.el6_0.7.i686 which needs to be installed.
To fix this issue :
Install the same version of the x86_64 bit packages on the system as the i686 versions needing to be installed.
Just take the .i686 package name krb5-libs-1.8.2-3.el6_0.7.i686 and drop everything after el6 and replace it with .x86_64; This becomes krb5-libs-1.8.2-3.el6.x86_64.
Use the yum downgrade option to install.
Hey Ramdev; great articles in your website but only for tech people not for people in facebook orTweet.
Hi Robert, Thanks for comment. Even I’m wondering how can this site impress more facebook or twitter users :)