1,wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.4.tar.bz2
2, make mrproper
3, cp /boot/config* .config ; make oldconfig
or make defconfig [ use the sample config as the .config file (linux-2.6.24.4/arch/x86/configs/i386_defconfig)]
或者更好的使用命令make localmodconfig来产生配置
5, Make kernel and install
make -j4 bzImage V=1
make -j4 modules V=1
make modules_install V=1
6, install others
cp arch/x86/boot/bzImage /boo/bzImage-2.6.24
cp System.map /boo/System.map-2.6.24
mkinitrd -v /boot/initrd-2.6.24.img 2.6.24.4
7, Add strings below to grub/menu.lst
title CentOS (2.6.24)
root (hd0,0)
kernel /bzImage-2.6.24 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.24.img
8,reboot and select your new kernel
9,有可能需要编辑initrd文件
解压:
# zcat initrd.gz | cpio -ivd --no-absolute-filenames
打包:
# find . | cpio -o -H newc -F tmp_initrd2
# gzip -f9 tmp_initrd2
10, 查看帮组
[root@Tony32 linux-2.6.39]# make help
11,配置工具比较:
Command |
---|