Red Hat Enterprise Linux: Difference between revisions

From cchtml.com
(Packages necessaries before install)
 
(114 intermediate revisions by 89 users not shown)
Line 17: Line 17:
The problem is that the installation script searches for the string "Red Hat" in /etc/redhat-release. So before installing the RPM simply replace "CentOS" by "Red Hat" in /etc/redhat-release using a text editor. After the RPM has installed successfully I recommend to restore your old /etc/redhat-release. For StartCom Linux create the file /etc/redhat-release with the string "Red Hat" in it.  This seems to have been fixed as of CentOS 5.1.
The problem is that the installation script searches for the string "Red Hat" in /etc/redhat-release. So before installing the RPM simply replace "CentOS" by "Red Hat" in /etc/redhat-release using a text editor. After the RPM has installed successfully I recommend to restore your old /etc/redhat-release. For StartCom Linux create the file /etc/redhat-release with the string "Red Hat" in it.  This seems to have been fixed as of CentOS 5.1.


==Red Hat Enterprise Linux 4 Update 3 (RHEL 4.3 and CentOS 4.3)==
==Package Installation==
The ATI GUI installer worked just fine for me with my Radeon 9700 Pro and CentOS (RHEL) 4.3.  ATI claims to "officially" support both RHEL and SUSE,  So contrary to the complex install procedure shown on the SUSE pages of this wiki, if you have RHEL, I would go with the simplest approach in the Related Resources link below.
First make sure you have the following packages gcc kernel-devel kernel-headers rpm-build if you don't sure, run:
==Red Hat Enterprise Linux 4 Update 6==
The ATI GUI installer on a ThinkPad T60 needed to install kernel-devel and rpm-build
# up2date -f kernel-devel rpm-build
# ./ati-driver-installer-8-4-x86.x86_64.run --listpkg
# ./ati-driver-installer-8-4-x86.x86_64.run --buildpkg RedHat/RHEL4


Installation of ATI Driver in Cent OS 5.5.This can also be applied in Redhat Enterprise Linux 5.x
  yum install gcc kernel-devel kernel-headers rpm-build


The difference will be in the platform you use, whether it is an 32bit or 64bit Distrubution, with minor changes in the configuration. I will explain the steps here.
after you can continue normally with the installation
 
    OS: I used Cent OS 5.5  32bit Distrubution
    Catalyst Version: ATI Catalyst 10.6 32bit
    Graphics Card: ATI Radeon HD 4670
 
The below steps are described in detail in my home page also "http://madathilunni.wordpress.com"
 
If you run into any trouble, you can uninstall the driver which is described at the last of this post.
 
******************************************************************************************************
The required steps are:
 
1) Open terminal and switch to root user:
 
  #su -
 
Create  folder ati in your /root directory
 
Download and place your ati catalyst setup file in /root/ati
 
Create a file fglrx.sh in /root/ati and add below lines:
 
 
  #!/bin/sh
  # Builds updated kernel module (based on currently loaded kernel)
  #
  cd /lib/modules/fglrx/build_mod
  ./make.sh
  cd /lib/modules/fglrx
  ./make_install.sh
  echo “To complete the process you must ‘init 3′ and ‘init 5′”
  echo “lsmod | grep fglrx”
 
 
Save and close the file.
 
Note:The purpose of creating this file is to recompile the kernel to load fglrx module after the ATI installation.
 
 
2) Before Installing the driver, You should Backup important files listed here:
 
Backup xorg.conf file:
 
  #cd /etc/X11
  #mv xorg.conf xorg.orginal
 
Note:- If you dont find any xorg.conf file, skip this step. It will only be found when u have already installed your fedora with a basic video driver(First step in Cent OS Installation..Remember?) or you have installed opensource ati driver (like mesa3d, radeonhd,etc..)
 
Backup initramfs file:
 
  #cd /boot
  #mv initramfs-’uname-r’.img initramfs-’uname-r’.img.org
 
Note: Here  uname-r is your kernel version. To know your kernel version type uname -r on your terminal window. Replace that kernel version as exactly without the quote.
 
!! IMPORTNT !!
 
If you have enabled SE Linux, disable it or set it to permissive mode. If you fail to do it, fglrx driver will incur problem in loading. If you don’t want to tinker with SE linux,then see the optional step described after the installation of ATI Driver below. ( STEP 9 )
 
 
3) Update your kernel:
 
  #yum install kernel-devel kernel-headers rpm-build
 
Note: The above step is Important
 
 
4) Install Compatibilty Libraries:
 
  #yum install glib glib2.1* compat-libstdc++* compat-glibc.*
 
Note: If any of the package is reported unavailable, continue installing others.
 
 
5) Now open file:
 
  #vi /etc/inittab
 
Change the runlevel to Multiusermode(change 5 to 3) by editing lastline like this:
 
id:5:initdefault:  to  id:3:initdefault
 
Save and close the file
 
Note: Above step is to avoid potential conflicts if you install ati driver while in graphical mode.
 
 
6) Restart the system by typing:
 
  #init 6
 
 
7) After restarting you will be login to your terminal as root user:
 
Go to /root/ati and start installation of your downloaded ati setup:
 
  #cd /root/ati
  #./ati-driver-installer-10-6-x86.x86_64.run
 
Note: Version listed here will be different depending upon your download.
 
 
8) When installation is complete type:
 
  #aticonfig –initial –input=/etc/X11/xorg.conf
 
Note: The above command will configure the ati to load its default settings after next reboot.
 
 
9) Now go to:
 
  #cat /usr/share/ati/fglrx-install.log
 
If you get the following in the install log, then you did not install the kernel-devel package :
 
Unloading radeon module…
Unloading drm module…
[Message] Kernel Module : Trying to install a precompiled kernel module.
[Message] Kernel Module : Precompiled kernel module version mismatched.
[Error] Kernel Module : Kernel module build environment not found – please consult readme.
 
Note: In case of error, although installation is completed, then there is a chance that the driver will not work.In that case you have to uninstall the ati driver (which is described below), update kernel and start again.
 
!! OPTIONAL STEP !!
 
If you dont want to disable SE linux but still want to use it, then there is a chance that SE linux will block fglrx module from starting. In order to prevent that, use any of the following command depending upon your kernel version:
 
FOR 32 BIT CENT OS VERSIONS:
 
  #chcon -t textrel_shlib_t /usr/lib/dri/fglrx_dri.so
 
FOR 64 Bit CENT OS VERSIONS:
 
  #chcon -t textrel_shlib_t /usr/lib64/dri/fglrx_dri.so
  #chcon -t textrel_shlib_t /usr/lib/dri/fglrx_dri.so
 
 
10) Now go to the directory where we have created the fglrx.sh file as described in the first step and run it:
 
  #cd /root/ati
  #./fglrx.sh
 
Note: The above command will recompile the kernel to load fglrx module
 
 
11) Now you have to create a new initial ramdisk image. For that type:
 
  #cd /boot
  #dracut -v initramfs-`uname -r`.img `uname -r`
 
Note: The above command will recompile the initial ramdisk image. Dracut is equivalent to mkinitramfs. Here, uname-r is your kernel version. To know your kernel version type uname -r on your terminal window. Replace that kernel version as exactly in dracut without the quote.
 
( EXAMPLE: dracut -v initramfs-2.6.31.5-127.fc12.i686.PAE.img 2.6.31.5-127.fc12.1686.PAE )
 
 
12) Restart the system by typing:
 
  #init 6
 
 
13) After restarting, again login as root user or Any other user and type:
 
  #startx
 
Note: If you can login to graphical terminal, the you had successfully completed the installation.
 
 
14) Open the terminal and go to the file:
 
  #vi /etc/inittab
 
Change the runlevel back to 5 ( Reverse of STEP 5 ) so that on next restart you will be logined to graphical terminal.
 
id:5:initdefault:
 
Save and close the file
 
You can go to System->Preferences to change your ATI card Settings.
 
You can enable Desktop effects such as Compiz ( System->Preferences->Desktop Effects).
 
Also you can go to /etc/X11/xorg.conf to check your card settings.
 
== UNINSTALL ATI DRIVER ==
---------------------------
 
 
If you have issues with Ati Driver you can uninstall it. Follow this steps as root user:
 
  #cd /usr/share/ati
  #sh./fglrx-uninstall.sh    ( UNINSTALLED ATI DRIVER )
  #cd /etc/X11/
  #rm xorg.conf    ( remove xorg.conf file )
 
Next is to recreate the initramfs. If you have already backed up the initramfs image as described above in STEP 2 during installation of ATi driver above then do these steps:
 
  #cd /boot
  #mv initramfs-’uname-r’.img.org initramfs-’uname-r’.img  ( REFER STEP 2 ON TOP OF THE PAGE )
 
If you hadn’t taken backup,then do:
 
  #cd /boot
  #dracut -v initramfs-`uname -r`.img `uname -r`
 
Note : To know your kernel version type uname -r on your terminal window. Replace that kernel version as exactly in dracut without the quote. ( For EXAMPLE: dracut -v initramfs-2.6.31.5-127.fc12.i686.PAE.img 2.6.31.5-127.fc12.1686.PAE )
 
 
OPTIONAL
--------
Remove compiz-fusion if you installed it by typing:
 
      #yum remove ccsm emerald-themes compizconfig-backend-kconfig compizconfig-backend-gconf fusion-icon* emerald
      compiz-fusion-unsupported-gnome compiz-fusion-gnome libcompizconfig compiz-gnome compiz-bcop compiz
      compizconfig-python compiz-fusion-extras-gnome compiz-kde compiz-manager
 
 
Users who used mesa experimental driver before installing ATI properitory driver can reinstall their experimental driver by typing the following command after doing the above steps:
 
    #yum reinstall mesa-dri-drivers-experimental compiz-gnome gnome-shell mesa-libGL
 
 
 
-----------------------------------------------------------------------------------------------
If you need to Install ATI Driver in  Fedora 12, Centos 5 or RHEL 5: Please visit my home page:
http://madathilunni.wordpress.com/
-----------------------------------------------------------------------------------------------


==Red Hat Enterprise Linux 4 Update 3 (RHEL 4.3 and CentOS 4.3)==
The ATI GUI installer worked just fine for me with my Radeon 9700 Pro and CentOS (RHEL) 4.3.  ATI claims to "officially" support both RHEL and SUSE,  So contrary to the complex install procedure shown on the SUSE pages of this wiki, if you have RHEL, I would go with the simplest approach in the Related Resources link below.
== Important Note as of 5/18/2009 ==
== Important Note as of 5/18/2009 ==
None of the above seems to work for an ATI Radeon HD4670 (512 MB) with the Dell S2409W 24" widescreen LCD on a Dell XPS 435MT (core i7-920) running under 64 bit CentOS 5.3 with the latest updates as of 5/18/2009. "Automatic" installation of the ATI Catalyst 9.4 driver seems to run smoothly, fglrxinfo detects and reports the graphics hardware, and aticonfig --initial reports that it saved a backup of xorg.conf. However, restart X11 (or reboot the PC) and what you get is an incomprehensible screen full of big squares peppered with little dots.  Alt-R will reboot the PC and allow use of CD 1 to reboot linux in rescue mode, after which the driver's uninstall script works nicely. So no permanent harm seems to be done.
None of the above seems to work for an ATI Radeon HD4670 (512 MB) with the Dell S2409W 24" widescreen LCD on a Dell XPS 435MT (core i7-920) running under 64 bit CentOS 5.3 with the latest updates as of 5/18/2009. "Automatic" installation of the ATI Catalyst 9.4 driver seems to run smoothly, fglrxinfo detects and reports the graphics hardware, and aticonfig --initial reports that it saved a backup of xorg.conf. However, restart X11 (or reboot the PC) and what you get is an incomprehensible screen full of big squares peppered with little dots.  Alt-R will reboot the PC and allow use of CD 1 to reboot linux in rescue mode, after which the driver's uninstall script works nicely. So no permanent harm seems to be done.

Latest revision as of 21:55, 26 February 2015

"Red Hat Enterprise Linux is the leading platform for open source computing. It is sold by subscription, delivers continuous value and is certified by top enterprise hardware and software vendors. From the desktop to the datacenter, Enterprise Linux couples the innovation of open source technology and the stability of a true enterprise-class platform." -redhat.com

Please note that Red Hat Enterprise Linux and Fedora Core are distantly related and are not the same product. Please see the Fedora distribution page for more details.

Another option for those wanting the stability of RHEL, there are various RHEL clones, some of them listed below:

- CentOS is a community effort which tracks each RHEL release and update and offers up2date and yum service. All this for free, donations encouraged.

- The StartCom Linux operating systems, are based on the RedHat Enterprise and Fedora source code each modified with reliability, security and efficiency in mind, to fit the tasks assigned to each flavor of StartCom Linux.

Installation Workaround for RHEL clones

Installation of current RPMs like fglrx_6_8_0-8.42.3-1.i386.rpm may fail on RHEL clones with this error message:

  FATAL: Module fglrx not found.
  /var/tmp/rpm-tmp.5182: line 807: [: =: unary operator expected

The problem is that the installation script searches for the string "Red Hat" in /etc/redhat-release. So before installing the RPM simply replace "CentOS" by "Red Hat" in /etc/redhat-release using a text editor. After the RPM has installed successfully I recommend to restore your old /etc/redhat-release. For StartCom Linux create the file /etc/redhat-release with the string "Red Hat" in it. This seems to have been fixed as of CentOS 5.1.

Package Installation

First make sure you have the following packages gcc kernel-devel kernel-headers rpm-build if you don't sure, run:

  yum install gcc kernel-devel kernel-headers rpm-build

after you can continue normally with the installation

Red Hat Enterprise Linux 4 Update 3 (RHEL 4.3 and CentOS 4.3)

The ATI GUI installer worked just fine for me with my Radeon 9700 Pro and CentOS (RHEL) 4.3. ATI claims to "officially" support both RHEL and SUSE, So contrary to the complex install procedure shown on the SUSE pages of this wiki, if you have RHEL, I would go with the simplest approach in the Related Resources link below.

Important Note as of 5/18/2009

None of the above seems to work for an ATI Radeon HD4670 (512 MB) with the Dell S2409W 24" widescreen LCD on a Dell XPS 435MT (core i7-920) running under 64 bit CentOS 5.3 with the latest updates as of 5/18/2009. "Automatic" installation of the ATI Catalyst 9.4 driver seems to run smoothly, fglrxinfo detects and reports the graphics hardware, and aticonfig --initial reports that it saved a backup of xorg.conf. However, restart X11 (or reboot the PC) and what you get is an incomprehensible screen full of big squares peppered with little dots. Alt-R will reboot the PC and allow use of CD 1 to reboot linux in rescue mode, after which the driver's uninstall script works nicely. So no permanent harm seems to be done.

Here is what finally worked on this particular hardware:

First, to save time and effort, as root edit /etc/inittab and change runlevel to 3. Replace this line

id:5:initdefault:

with

# id:5:initdefault:
# for tinkering with display and xorg.conf
# boots to text mode, requires startx to start X
id:3:initdefault:

Then the system will boot to multiuser with text display, and X can be started by startx.

Next, make sure that the required packages have been installed. After reading the installation instructions, I used CentOS 5.3's graphical Package Manager to install the Development Libraries, Gnome Software Development, and X Software Development. Undoubtedly this adds more than the bare minimum, but disk space is cheap and (my) time is not.

I took the path of generating and testing rpms. This made it easy to back out of any drivers that failed to work (and plenty failed)--just ^-Alt-Backspace to break out of X, then at the command line

rpm -e drivername

e.g.

rpm -e fglrx64_7_1_0

and finally make sure that /etc/X11/xorg.conf was restored to a copy of its original form.

Caution: when testing, one version (8.6) responded to startx by blanking the screen for several seconds, during which the fans in the Dell XPS 435 revved up and stayed revved up. This made me nervous as I imagined the possibility that the video card might overheat (read something about that somewhere on the WWW in connection with a different card and a different driver). I had to repeatedly press ^-Alt-Del and ^-Alt-Backspace to stop it and reboot.

Finally I discovered that the 8.8 version worked with my hardware.

Installing the version 8.8 driver

The ATI page for the 8.8 version actually placed a file called ati-driver-installer-8-7-x86.x86_64.run on my Desktop. The name suggests that it's 8.7, but I tried it anyway.

As root,

sh ./ati-driver-installer-8-7-x86.x86_64.run

brought up a panel that I used to select "Generate Distribution Specific Driver Package." I selected RedHat/RHEL5_64a (RedHat/RHEL5 for 32 bit). The driver package turned out to be an rpm called fglrx64_7_1_0-8.512-1.x86_64.rpm (fglrx_7_1_0-8.512-1.i386.rpm for 32 bit).

Then I ran

rpm -Uvh fglrx64_7_1_0-8.512-1.x86_64.rpm

which failed with an error message that indicated it needed compat-libstdc++-33. After installing that, I tried installing the fglrx... rpm again, which succeeded. Finally, I typed

aticonfig --initial

at the system prompt.

I rebooted, logged in as myself (not root), ran startx, and was relieved to see that the display was in a higher resolution mode, and ATI Catalyst Control Center now appeared in the System / Preferences and System / Administration menus.

Turns out I couldn't run ATI Catalyst Control Center as myself--had to su, then run amdcccle at the command line.

After verifying that all was well, as root I restored the boot runlevel to 5 by editing /etc/inittab again.

Did a bit of tinkering and got the following performance out of glxgears: 720 frames in 5.4 sec = 133 FPS. Doesn't seem too impressive. fgl_glxgears causes a segmentation fault and exits. Dragging windows around the screen, I see a distinct lag between when I drag something and when it finally gets to its location. But at least I'm not looking at a 1200x800 display.

Tips and Tricks

If you have SELinux enabled and set to enforcing you may need to change the context of the fglrx_dri.so file for it to load properly:

    chcon -t textrel_shlib_t /usr/lib/dri/fglrx_dri.so

Substitute lib with lib64 where appropriate.

Tip for Centos 5.4 x86_64 kernel 2.6.18+ Before installing the driver package it is absolutely vital to ensure that version/build number in /lib/modules/{your kernel build}/build/include/linux/utsrelease.h number is EXACTLY the same as the output of uname -r

for example

    uname-r
    2.6.18-164.el5
    cat /lib/modules/2.6.18-164.el5/build/include/linux/utsrelease.h 
    #define UTS_RELEASE "2.6.18-164.1.15.el5"

fglrx.ko will NOT be built and installed properly due to the discrepancy (1.15) in utsrelease.h.

In most cases modifying utsrelease.h solves the problem

Related Resources

Follow link "ATI Driver Installer"


Distribution Neutral Steps

Verifying | Configuring | Troubleshooting