Configuring and building the kernel

Surprising as it may seem, if DRI isn't working it may be because you already have a DRI module included in your kernel build. The following instructions assume that you are comfortable rebuilding your kernel.

Install the kernel source (assuming that you are using a source RPM):

rpm -Uvh kernel-2.4.20-2.6.src.rpm

Prepare the build (assuming that your kernel source has installed under /usr/src/redhat/SOURCES/):

rpmbuild -bp /usr/src/redhat/SPECS/kernel-2.4.spec

Configure the kernel, by going to (for example) /usr/src/redhat/BUILD/kernel-2.4.20/linux-2.4.20/ and running:

make menuconfig

In menuconfig, make the following changes:

Exit from menuconfig and copy the configuration file to the source directory (for example)

cp .config ../../../SOURCES/kernel-2.4.20-i386.config

My preference is to build a kernel RPM at this stage, because it makes it easier to reinstall the kernel again later, when you may not have the build tree available, and I don't like to fill up /boot with too many kernel images. Run:

rpmbuild -bb /usr/src/redhat/SPECS/kernel-2.4.spec

When this has completed, you should have a new kernel RPM, such as /usr/src/redhat/RPMS/i686/kernel-2.4.20-2.6.i386.rpm. Install this with the command:

rpm -Uvh kernel-2.4.20-2.6.i386.rpm

Check that the kernel has installed properly. The main things to check are:

ln -s /usr/src/redhat/BUILD/kernel[number]/linux[number] /usr/src/linux

Once the new kernel has been installed properly, you should reboot. If you're not sure about the kernel, then read the Linux Kernel HOWTO before going any further. You will want to be running the new kernel before building XFree86.