CentOS kernel Upgrade (2.6.32->3.19.0)

Source: Internet
Author: User
1. Understanding the definition of the kernel and the significance of upgrading the kernelThe operating system is a supporting software that deals with hardware and provides human-computer interaction. The Linux kernel is responsible for managing the system's processes, memory, device drivers, files, and network systems, which determine the performance and stability of the system. So we need to upgrade the kernel when there are new hardware features or higher requirements for system stability. For example, this time I upgraded because I wanted to use Docker,docker to require a CentOS kernel version of at least 3.8, so I needed to upgrade the kernel. 2. Understand the concept of kernel compilation and moduleLinux kernel is based on the C language, generally our official website https://www.kernel.org download is the kernel source code, and compile other C language programs, like the kernel file to generate executable files, need to compile the kernel source code. Kernel modules are code that allows the operating system kernel to load and execute when needed, which also means it can be uninstalled by the operating system when it is not needed. They extend the functionality of the operating system kernel but do not need to reboot the system. For example, one of the kernel modules is the device driver module, which is used to properly recognize the operating system and use hardware devices that are installed on the system. Without the kernel module, we had to recompile the kernel image of the single kernel operating system again and again to add new functionality. We can understand the kernel module as: Functional function block that completes a function, can plug and unplug on the operating system. 3. Compiling methodA.make Menuconfig:: Source root directory generated. config (not automatically generated),. config is the selection of the individual kernel compilation options.      The graphical interface is ejected for manual configuration and the. config file is generated. B.make Defconfig:: Based on the current system's schema default. config to generate the. config in the kernel source directory (configuration file for each schema: Ex. arch/x86/configs/x86_64_defconfig) C.make      Oldconfig:: Put existing. config in the source root directory and execute it to reuse the configuration of the previous kernel compilation options.      D.make xconfig:: Graphical configuration, the need for QT3, individuals feel that there is no need to make Menuconfig is enough. E.make localmodconfig:: Generate. config that is object to the kernel module being used 4. Upgrade process      a. Download the kernel source pack       go to Https://www.kernel.org/pub/linux/kernel /v3.x/download       or direct use  wget  https://www.kernel.org/pub/linux/kernel/v3.x/ linux-3.19.tar.gz  command Download kernel source      b. Decompression      TAR-XVF Linux-3.19.tar.xz-c destination Folder       destination folder There may be/usr/src/kernel/, there may be/usr/src, there may be/usr/src/ Redhat, according to different Linux types and versions           fill in the path that conforms to the operating system.      c. Copy old config file       because you want to use the make Oldconfig command to compile the kernel source code, So copy the old config file       copy the config-2.6.32-220.el6.x86_64 file from the/boot directory to the zipped folder       cd/usr/src/linux-3.19/     cp/boot/config-2.6.32-220.el6.x86_64. Config    D. Compile option configuration    e.make-j4 bzimage build kernel files using make Oldconfig multiplexing kernel       MAKE-J4 Modules Compilation Module      MAKE-J4 Modules_install Compile installation module      f.make install installation       g. Modify grub.conf file      vi/etc/grub.conf  3.19.0) ">
Count the location of the newly installed kernel, start at 0, and then set default to that number, and generally the newly installed kernel is in the first position, so set default=0. Restart reboot. Upgrade complete.
Related Article

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.