How To Compile/ Install New Kernel 3.13.6 In CentOS 6.5

by lifeLinux on March 20, 2014

Here in this post I will explain how to compile and install Linux Kernel 3.13.6 in CentOS 6.5. Linux Kernel 3.3.16 stable latest version has released 2014-03-07 and you can download it from kernel.org.

Follow the step by step to compile and install Linux Kernel 3.13.6 in your system

Step 1:
To compile Linux Kernel the following are required to be installed. Login as root and type the following command

# yum install make wget gcc ncurses-devel bc perl dracut-tools.noarch -y

Step 2:
Download the Linux Kernel 3.13.6 from kernel.org or by using the below command

# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.6.tar.gz

And extract the tar file run the following command

# tar zxvf linux-3.13.6.tar.gz
# cd linux-3.13.6

Step 3:

# make menuconfig

The above command is used to configure the Linux kernel. Once you execute the command, you will get a pop up window with the list of menus and you can select the items for the new configuration. If you like to have your existing configuration then run the below command.

# make oldconfig

Step 4:
Type the following command to compile the Linux Kernel

# make

The above command is used to compile the Linux Kernel. It will take some time to complete it, approximately 60 min to 120 min it depends on your system configuration.

Step 5:
Type the following command to install new Kernel into your system

# make modules_install install

The above command will install the Linux Kernel and it will create some files under /boot/ directory and it will automatically make a entry in your grub.conf.
Some files are:

# ls /boot/ | grep 3.13.6
initramfs-3.13.6.img
System.map-3.13.6
vmlinuz-3.13.6

To make it default just modify the grub.conf or menu.lst under “/boot/grub/” directory. Open the file using below command.

vi /boot/grub/grub.conf

Sample output

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.5.1.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-431.5.1.el6.x86_64 ro root=/dev/mapper/vg_firewall-lv_root nomodeset rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_firewall/lv_root rd_NO_MD rd_LVM_LV=vg_firewall/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-431.5.1.el6.x86_64.img
title CentOS (3.13.6)
        root (hd0,0)
        kernel /vmlinuz-3.13.6 ro root=/dev/mapper/vg_firewall-lv_root nomodeset rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_firewall/lv_root rd_NO_MD rd_LVM_LV=vg_firewall/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
        initrd /initramfs-3.13.6.img
title CentOS (2.6.32-358.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg_firewall-lv_root nomodeset rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_firewall/lv_root rd_NO_MD rd_LVM_LV=vg_firewall/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-358.el6.x86_64.img

Just check the entry for CentOS 6.5, if it is in second place then change default=1
Final, type the following command to reboot server

# reboot

After booting open a terminal and type “uname -a”

# uname -a
Linux Firewall 3.13.6 #1 SMP Wed Mar 12 20:49:55 ICT 2014 x86_64 x86_64 x86_64 GNU/Linux

{ 1 comment… read it below or add one }

ALan Johnson January 26, 2015 at 7:53 pm

Worked perfectly – many thanks!

Reply

Leave a Comment

Previous post:

Next post: