关闭

how to upgrade CentOS kernel

标签: centos
1163人阅读 评论(0) 收藏 举报
分类:

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来产生配置

4, make dep  
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 Description
make config Text based configuration. The options are prompted one after another. All options need to be answered, and out-of-order access to former options is not possible.
make menuconfig An ncurses-based graphical menu (only text input). Navigate through the menu to modify the desired options.
make defconfig Generates a new config with default from the ARCH supplied defconfig file. Use this option to get back the default configuration file that came with the sources.
make nconfig Graphical menu based on ncurses. Requires sys-libs/ncurses to be installed.
make xconfig Graphical menu using Qt4. Requires dev-qt/qtgui to be installed.
make gconfig Graphical menu using GTK+. Requires x11-libs/gtk+, dev-libs/glib, and gnome-base/libglade to be installed.
make oldconfig Review changes between kernel versions and update to create a new .config for the kernel.
make allyesconfig Enables all configuration options in the kernel. target will set all kernel options to *. Make sure a backup of the current kernel configuration is acquired before experimentally using it!
12,编译所有的模块allyesconfig

make mrproper
make allyesconfig
make localmodconfig
make
make modules_install
make install
#重新生成一遍initrd
<pre name="code" class="plain">mkinitrd -v /boot/initrd-2.6.24.img  2.6.24.4

 

参考:

http://www.gentoo.org/doc/en/kernel-upgrade.xml

http://www.linuxtopia.org/online_books/linux_kernel/kernel_configuration/ch05.html

https://wiki.archlinux.org/index.php/Modprobed-db

Linux 配置项含义查询:http://cateee.net/lkddb/web-lkddb/       http://kernel.xc.net/html/linux-2.6.27/xtensa/



http://blog.faq-book.com/?p=6811

http://wiki.gentoo.org/wiki/Kernel/Configuration


0
0

猜你在找
查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:151711次
    • 积分:2071
    • 等级:
    • 排名:千里之外
    • 原创:63篇
    • 转载:6篇
    • 译文:2篇
    • 评论:23条
    文章分类
    最新评论