Rebuild Kernel CentOS - hollie/misterhouse GitHub Wiki
taken from Ron's email on the Misterhouse mailing list:
Build Kernel from source on CentOS 4.2 with latest updates:
Get depedencies:
- yum install rpm-build kernel-devel.i686
 - yum install redhat-rpm-config.noarch ncurses-devel
 
- uname -r
 
Get source package:
- cd /house/install
 - wget
 
- rpm -Uvh kernel-2.6.9-22.0.2.EL.src.rpm
 
- cd /usr/src/redhat/SPECS
 - rpmbuild -bp --target i686 kernel-2.6.spec
 
- cd ../BUILD/kernel-2.6.9/linux-2.6.9
 - ln -s /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src/linux
 - make mrproper
 - cp /boot/config-2.6.9-22.0.2.EL .config
 
- vi Makefile
 
Use menuconfig to enable/disable any non-standard modules.. (here you can disable the HID drivers) If you don't plan to modify any settings, you can skip this step.
- make menuconfig
 
- make bzImage
 - make modules && make modules_install
 - make install
 - vi /boot/grub/grub.conf
 
Reboot and confirm new kernel is being used
- uname -r