CentOS kernel Upgrade tutorial

Source: Internet
Author: User

CentOS kernel Upgrade tutorial

Centos kernel upgrade, Update Procedure record

Linux kernel homepage: www.kernel.org

Download:

wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.4.tar.bz2

1. view the current system version:

12
[root@xyly ~]# uname -aLinux xyly 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

The current system kernel version is 2.6.18-164. el5, And the downloaded kernel version is 2.6.39.4.

2. kernel compilation steps.

12345678
[Root @ xyly ~] # Cd/usr/src [root @ xyly ~] # Tar jxvf Co., linux-2.6.39.4.tar.bz2. [root @ xyly ~] # Cd linux-2.6.39.4 [root @ xyly linux-2.6.39.4] # make mrproper # Remove kernel dependencies and compiled junk Information <span id = "more-908"> </span> [root @ xyly linux-2.6.39.4] # make menuconfig or make xconfig or make gconfigmake menuconfig in menu mode enter Kernel configuration interface make xconfig is in Gui mode enter Kernel configuration interface make gconfig in Gui mode enter Kernel configuration interface

I chose the menu mode.

Check the required file system and the corresponding hardware parameters. If you are familiar with it, you can adjust the kernel parameters.

123
[Root @ xyly linux-2.6.39.4] # make # compile the kernel [root @ xyly linux-2.6.39.4] # make modules # compile the kernel module [root @ xyly linux-2.6.39.4] # make modules_install # Install the kernel module

After the installation is successful, the/lib/modules directory will have a subdirectory 2.6.39.4, which contains all modules that can be loaded by the new kernel.

123
[Root @ xyly linux-2.6.39.4] # makeinstall # compile and install sh/root/linux-2.6.39.4/arch/x86/boot/install. sh 2.6.39.4 arch/x86/boot/bzImage \ System. map "/boot"

Kernel installed

1234
[root@xyly boot]# ll initrd-2.6.39.4.img-rw------- 1 root root 2722020 Aug 29 14:43 initrd-2.6.39.4.img[root@xyly boot]# pwd/boot

3. Set the startup sequence and add the compiled kernel to grub.

(Kernel startup has been added, saving your hands)

Modify the default startup sequence in/etc/grub. conf as follows:
Default = 0
Restart the system and check whether the kernel has been upgraded.

12
[root@xyly ~]# uname -r2.6.39.4

OK !!! Upgrade complete!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.