在redhat rel 内核版本2.6.18-53.el5xen安装 linux2.6.22

来源:互联网 发布:织梦cms 安装 gbk 编辑:程序博客网 时间:2024/05/22 00:36
下载自己想要的内核,
以linux-2.6.22.tar.gz内核为例。(rel5 linux kernel is 2.6.18)
>tar -zxvf linux-2.6.22.tar.gz
>su
>password:
>mv linux-2.6.22 /usr/src
>cp /usr/src/linux-2.6.22
>cp /boot/.config  ./    //use the defaut kernel config that your current linux config
>make menuconfig

choose Load an Alternate Configuration File . use .config  (in the current dirctory)

press TAB key choose OK  to go to main menu ,then  TAB key to exit

>make bzImage
for 20 min , then compile ok!

>make modules  // compile modules that selected by default config  through .config file

for 20min ,then compile OK!

>make modules_install //install modules

>make install // install kernel

that is ok!

Look the change of /boot/gurb/grub.conf

>cat /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=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.22)
        root (hd0,0)
        kernel /vmlinuz-2.6.22 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.22.img
title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)
        root (hd0,0)
        kernel /xen.gz-2.6.18-53.el5
        module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        module /initrd-2.6.18-53.el5xen.img
title Red Hat Enterprise Linux Server-base (2.6.18-53.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-53.el5.img

the first title is the new kernel !!

>reboot

enter the timeout interface ! please enter ESC key to choose selecting kernel UI

test!!!!!!


Also you can modify /boot/grub/grub/gurb.conf to set default kernel

default=1  //default kernel
timeout=10

default=1 // defalut : the second title is default val


0 0