Performing a Kernel Upgrade

In order to upgrade the existing kernel to a newer version in an Ubuntu-based system, the following process can be followed.

Go to http://kernel.ubuntu.com/~kernel-ppa/mainline/ and find the desired later kernel. It is advised to stay away from the release candidates (RC), and even versions that are too recent, in order to avoid stability problems. One other thing that needs to be checked is the compatibility of existing third-party drivers (such as nVidia drivers) with the newer kernel versions. Do NOT upgrade your kernel if the current driver you are using expressely mentions no support for the kernel you are trying to install.

Download the following 3 files depending on your processor architecture:

(For this example, version 3.12.5 is used.)

64-bit:

linux-headers-3.12.5-031205-generic_3.12.5-031205.201312120254_amd64.deb
linux-image-3.12.5-031205-generic_3.12.5-031205.201312120254_amd64.deb
linux-headers-3.12.5-031205_3.12.5-031205.201312120254_all.deb

32-bit:

linux-headers-3.12.5-031205-generic_3.12.5-031205.201312120254_i386.deb
linux-image-3.12.5-031205-generic_3.12.5-031205.201312120254_i386.deb
linux-headers-3.12.5-031205_3.12.5-031205.201312120254_all.deb

Save them to a directory, and then execute the following:

sudo dpkg -i ./[directory]/*.deb

This command will initiate the installation of the new kernel. Restart is required after the installation in order for the new kernel to be used.

After reboot, check that your new kernel version is in use by running:

uname -r

If for some reason the kernel does not work or is causing your system to be unstable, you can remove it by using:

sudo apt-get purge linux-image-[version]*

Important: You may be prompted to use autoremove when using apt-get. Do NOT remove the older kernel image until you are sure the new kernel is functioning properly. Doing so will take away your chance of reverting if the new kernel does not work as expected.

Source: http://ubuntuhandbook.org/index.php/2013/09/linux-kernel-3-11-released-install-upgrade-in-ubuntu-13-0412-04/