Search This Blog

Saturday, November 1, 2014

CentOS 6.5, Custom Linux Kernel 2.6.36.4 with UnionFS

CentOS 6.5 is currently using Linux Kernel 2.6.32.   There are many blogs, posts and snippets around that will lecture you about the 'standards' of Enterprise Linux and force the idea down your throat that if you change the CentOS kernel, you are wrong and your operating system will be flawed and unsupported, etc. etc...

In reality, you may have an environment where you can only install and use CentOS 6.5 instances.  However, you may be in a position in which you can integrate custom code.  In my situation, I am looking to upgrade the kernel so I can use unionfs.  UnionFS is used in LTSP to create a virtual filesystem in which tmpfs is the writeable layer for the read-only root filesystem which provides the OS via NFS/nbd.

This script should work with CentOS 6.5 from a 'Minimal' ISO install.  It should be run as root, and should be the first thing you do with a fresh install.  Once you have verified the kernel is working, you can then install updates and go from there.

One thing to note, this is a CUSTOM solution for a specific situation.  This script will add an exclusion to the YUM configuration so that kernel updates are no longer downloaded.  Use this script at your own risk and be sure to test thoroughly in a VM before trying to run this on any systems used by others.