Skip to main content
CentOSLPIC-2 Exam 201

Compiling a Linux Kernel on CentOS 6.5

By May 27, 2014September 12th, 2022No Comments

LPIC-2-201Getting ready for the LPIC-2 201 exam we look at objective 201.2 compiling a Linux Kernel. For this we use the 3.14 kernel on CentOS 6.5. Changing from the original 2.6.32 kernel that ships with CentOS.

Having downloaded the kernel we expand it in the the directory /usr/src

tar -Jxvf  linux.314.3.tar.xz -C /usr/src/



From there the steps are:

  1. cd /usr/src
  2. ln -s linux.3.24.3 linux
  3. cd linux
  4. yum install gcc ncurses-devel
  5. make mrproper
  6. make menuconfig
  7. make bzImage
  8. make modules
  9. make module_install
  10. make install

The lest step make install is the greatest time save. This copies the kernel to /boot , creates a grub entry and uses dracut to make a new initramfs. Should we want to check on the make targets we can use:

make help