How To Upgrade The Kernel On Ubuntu 12.04 And Centos 6.5

by
Share this Article: Facebook0Google+0Twitter14LinkedIn0Reddit0StumbleUpon0

Author Bio:

This is a guest post, written by one of the Unixmen regular reader Mr.Mazen Bdewi. Contact the Author at: mazen.bdewi@gmail.com, if any queries.

Well, let us show you how to upgrade the kernel.

Enter the following command to know about your current kernel version:

uname -r

Then, Let’s Update our system.

On Ubuntu:

sudo apt-get update

On CentOS:

yum update

To update Kernel, you need to install the following prerequisites.

On Ubuntu:

sudo apt-get gcc
sudo apt-get groupinstall "Development Tools"
sudo apt-get install ncurses-devel
sudo apt-get install libncurses5-dev
sudo apt-get install python-dev

On CentOS:

yum gcc
yum groupinstall "Development Tools"
yum install ncurses-deve
yum install libncurses5-dev
yum install python-dev

Then go to site www.kernel.org, and chose any version you need, Here I will download 3.14.4.

On Both Ubuntu & CentOS:

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.4.tar.xz 
tar xvfvJ linux-3.14.4.tar.xz -C /usr/src
cd /usr/src/linux-3.14.4

Before compiling a new kernel, you need to generate a kernel configuration.

If you want to generate a kernel configuration via graphical user interface, run with root user:

make menuconfig

kernel1

if you want to use the same kernel configuration as the currently running kernel, run the following command instead. You still need to set any newly added configuration options by manually answering questions. If you do not know the meaning of each option, just press enter to accept a default answer.

make oldconfig

If you want to use the same old kernel configuration, and automatically accept default answers to every question, run the following command instead:

sh -c 'yes "" | make oldconfig'

After kernel configuration is done, go ahead and compile a new kernel.

make

when you do (make) this step will take about 45 minutes, depending on your Ram and CPU speed.

Now install the new kernel by:

make modules_install install

Finally, reboot your system and choose new kernel.

kernel 2

That’s it.

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter14LinkedIn0Reddit0StumbleUpon1