Compile Kernel on Redhat Linux


Get your last stable kernel at here
On my example, last stable kernel was 2.6.22.1 but now 2.6.23.12
# mv linux-2.6.22.1.tar.bz2 /usr/src
# tar jxvf linux-2.6.22.1.tar.bz2
# ln -s linux-2.6.22.1 linux
# cd /usr/src/linux
# vi /etc/modprobe.conf
alias eth0 pcnet32
#alias scsi_hostadapter mptbase
#alias scsi_hostadapter1 mptscsih
alias snd-card-0 snd-ens1371
options snd-card-0 index=0
install snd-ens1371 /sbin/modprobe --ignore-install snd-ens1371 && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-ens1371 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-ens1371
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd

# make clean && make mrproper
# cp /boot/config-2.6.9-5.EL ./.config
# make menuconfig
# make rpm
# cd /usr/src/redhat/RPMS/i386/
# rpm -ivh kernel-2.6.22.1-1.i386.rpm
# mkinitrd /boot/initrd-2.6.22.1.img 2.6.22.1
# vi /boot/grub/menu.lst
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.22.1)
root (hd0,0)
kernel /vmlinuz-2.6.22.1 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.22.1.img

# reboot
# rm -rf /usr/src/redhat/BUILD/kernel-2.6.22.1/
# rpm -e kernel-doc-2.6.9-5.EL
# rpm -e kernel-hugemem-devel-2.6.9-5.EL
# rpm -e kernel-smp-devel-2.6.9-5.EL
# rpm -e kernel-devel-2.6.9-5.EL
# rpm -e kernel-2.6.9-5.EL
# rm -rf /usr/src.redhat/SRPMS/kernel-2.6.22.1-1.src.rpm
# rm -rf /usr/src/redhat/RPMS/i386/kernel-2.6.22.1-1.i386.rpm

Popular posts from this blog

Howto configure boot device order on ILOM

Installing Depot files on HP-UX 11.23 ia64

SAN Switch Config Command