how to upgrade CentOS kernel

原创 2011年08月25日 15:42:17

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


相关文章推荐

Hardware Upgrade: How To Install New RAM

Hardware Upgrade: How To Install New RAM RAM is one of those upgrades everyone seems to s...

How to perform Rolling Upgrade-Downgrade in 11g ASM

The purpose of this document is to provide information about the ASM rolling upgrade feature and Ste...

How to install or upgrade UV4L on Raspbian (for the Raspberry Pi)

How to install or upgrade UV4L on Raspbian (for the Raspberry Pi) To install UV4L open a terminal a...

Hardware Upgrade: How To Install A New Hard Drive, Pt 1

Hardware Upgrade: How To Install A New Hard Drive, Pt 1 It’s recession economics 101—you ...

[]How To Upgrade to PHP 7 on Ubuntu 14.04

注:此文复制于https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04 ...

How to upgrade from ESXi 5.x to ESXi 6.0 via CLI

The post explains how to upgrade from ESXi5.0/5.5 to ESXi 6.0U2 with new esxcli command “esxclisoftw...

How to Completely Fix kernel32.dll Error

We all know that file kernel32.dll is a legitimate file belonging to Client Service for NetWare to e...

[win32] How to use WIN32 Event Kernel Object

【自动和手动的Event,例子很好。SM客户端的几个不同线程,有自己的Event。Event是Win32多线程同步上,最灵活的方式。】 原文链接:http://www.codeproject.com/...

How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux

Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux UPDATE: 13/03/2014 – Readers should fol...

How to instantiate I2C devices[Doc-from-kernel]

 1 How to instantiate I2C devices2 ==============================34 Unlike PCI or USB devices...
  • fall4u
  • fall4u
  • 2011年04月11日 10:52
  • 189
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:how to upgrade CentOS kernel
举报原因:
原因补充:

(最多只允许输入30个字)