1、解压文件linux-2.6.28.tar.bz2,解压之后的文件中还少个.config的文件,所以要将usr/src/kernels下的系统原有的.config移动过来;
2、make distclean;
3、make menuconfig;
3 、make bzImage;(i为大写)
这步执行完毕后记录最后的ready路径,我的为:"arch/x86/boot/bzImage"
4、make modules;
5、make modules_install;
6、进入/lib/modules目录下;
7、mkinitrd initrd-2.6.28 2.6.28;(此步骤在/lib/modules目录下),执行完毕后,当前文件夹下多了一个文件initrd-2.6.28 ,
8、将文件initrd-2.6.28 移动到boot下:mv initrd-2.6.28 /boot;
9、将第三步中的bzImage文件移动到/boot下并更名为:vmlinuz-2.6.28;
10、修改文件:vi /boot/grub/grub.conf;源文件如下:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-164.el5.img
其中最后四行为当前的系统内核,现在添加内核2.2.68,添加后如下:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-164.el5.img
title Red Hat Enterprise Linux Server (2.6.28)
root (hd0,0)
kernel /vmlinuz-2.6.28 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.28
只是将最后四行复制了一遍,然后修改一下内核名称就可以了。title后面为在系统启动时显示的内核名称;
11、reboot重启系统,在系统刚开启的时候有两个内核供选择(很快,只闪一下),选择刚新安装的2.6.68就可以。
到此,安装完毕!