Linux Kernel-4.3 Compilation from source

The Linux Kernel 4.3 has been released today, Monday the 2nd of November 2015. I have compiled it from source on a Virtual Box CentOS 7 minimum install virtual machine for some further testing. I have also use my same old configuration file. You can also view detailed packages and commits on the git repo. Here, is a brief idea how to compile it from source.

Linux_kernel_map
Linux Kernel Map - Photo credits Wikipedia

1. You will need to download all the pre-requirements if you are on a minimum install.

yum groupinstall "Development Tools"
yum install ncurses-devel bc hmaccalc zlib-devel elfutils-libelf-devel binutils-devel qt-devel

2.Download the wget tools to download the Kernel itself.

yum install wget

3.Download and untar the kernel directory

wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz
tar -xvzf linux-4.3.tar.gz

4. You will need to ensure that the decompressed directory is in the /usr/src/kernels directory. If you have untar it at a location other than this one move the linux-4.3 directory in the /usr/src/kernels

5. Choose your default kernel configuration options

make menuconfig

6. To use the old config file

make oldconfig

7. Compiling the kernel

make

8. Installing the kernel

make modules_install install

Tips:

  • Be sure to get rid of to many old kernels files in the /boot directory to do not get confused.
  • You can also use the command make olddefconfig to set the default values without prompting anew for configuration.
  • To set different boot options use the command sudo grub2-set-default 0 - 0 in this case is the default kernel.
  • The command make usually take lots of time. If you have 4 vCPU, you can use make as this: make -j 4 where j stands for jobs and 4 for all the 4 CPUs
  • uname -r allows you to find your kernel version. Example uname -r gives me 3.19.0-25-generic ; i.e the letter 3 is the major, number 19 is the minor (developmental stage) and 0 is the revision number