Personal tools
You are here: Home Linux Linux and VMWare related Issues Recompiled CentOS 4 Kernels
Document Actions

Recompiled CentOS 4 Kernels

Recompiled CentOS 4 Kernels, spec files and patch files for the 2.6 series of kernels. These are provided to fix clock drift issues when running a 2.6 series kernel under VMware.

Below you will find patched kernel rpm packages for CentOS 4.  These binary kernel rpm packages have the /include/asm-i386/param.h file changed to "define HZ      100" to fix clock drift issues under VMware and sets the kernel back to the same behavior of the 2.4 series.

I have clients that utilize VMware and have created these packages for them.  These packages are used in production environments without problem.  Before installing into your own production systems you should test on a developement/test box and ensure you have a good backup.  These packages and files are provided without warranty so use at your own risk.  You may download the patch file for a given kernel, a spec file and download the source rpm directly from centos if you prefer to build your own kernel.

To fix the clock drift issues in VMware we must edit /include/asm-i386/param.h and change the following line:
 "define HZ      1000" to "define HZ      100"

Once you install the kernel I suggest you also add a "clock=pit" to your kernel's entry in grub.conf.

The files below are for CentOS kernel-2.6.9-34.0.8.EL:

A fully patched and compiled kernel for VMware can be found here:

The files below are for CentOS kernel-2.6.9-34.0.2.EL:

A diff patch file can be downloaded from here.
A diff of the kernel.spec can be downloaded from here.

A fully patched and compiled kernel for VMware can be found here:

If you want to build the kernel yourself download the source file for your kernel from CentOS and install the source rpm. Place the patch files into the directory that you had the source rpm install to and issue the following commands: (replace versions, architecture, etc for your platform).  Also add a "clock=pit" line to your kernel's grub.conf file.

Build the kernel binary package only: rpmbuild --bp --target=i686 kernel-2.6.spec

Build the kernel binary and source packags: rpmbuild --ba --target=i686 kernel-2.6.spec

The files below are for CentOS kernel-2.6.9-22.0.1.EL:

A patch file can be downloaded from here.
A modified SPEC file to apply the above patch can be downloaded from here.
A fully patched and compiled kernel for VMware can be found here: linux-2.6.9-22.0.1.EL.vm.rpm.

If you want to build the kernel yourself download the source file for your kernel from CentOS and install the source rpm.  Edit the file /include/asm-i386/param.h as instructed above then go to the /usr/src/redhat/SPEC directory and issue the following commands: (replace versions, architecture, etc for your platform)

Build the kernel binary package only: rpmbuild --bp --target=i686 kernel-2.6.spec

Build the kernel binary and source packags: rpmbuild --ba --target=i686 kernel-2.6.spec

The files below are for CentOS kernel-2.6.9-22.0.2.EL:

A patch file can be downloaded from here.

A modified SPEC file to apply the above patch can be downloaded from here.
A fully patched and compiled kernel for VMware can be found here: linux-2.6.9-22.0.2.EL.vm.rpm.

If you want to build the kernel yourself download the source file for your kernel from CentOS and install the source rpm.  Edit the file /include/asm-i386/param.h as instructed above then go to the /usr/src/redhat/SPEC directory and issue the following commands: (replace versions, architecture, etc for your platform)

Build the kernel binary package only: rpmbuild --bp --target=i686 kernel-2.6.spec

Build the kernel binary and source packags: rpmbuild --ba --target=i686 kernel-2.6.spec

Powered by Plone CMS, the Open Source Content Management System