On the frontend, check out the Rocks source code. See Access to Rocks Source Code for details.
Change into the directory:
# cd rocks/src/roll/kernel/src/kernel.org
Download the kernel source tarball from kernel.org. For example:
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-126.96.36.199.tar.gz
Create a kernel "config" file and put it in config-<version>
You can create the config file by using the following procedure:
# tar xzf linux-188.8.131.52.tar.gz # cd linux-184.108.40.206 # make menuconfig
Configure the kernel anyway you need, and after the configuration is over choose to save the configuration in an alternative location. Enter the name of the file as ../config-220.127.116.11. Finally, exit the configuration and remove the linux-18.104.22.168 directory.
The <version> number must match the version number of the kernel source. For example, if you downloaded linux-22.214.171.124.tar.gz, the name of the config file must be config-126.96.36.199.
The file version.mk has the following contents:
NAME = kernel RELEASE = 1 VERSION = 188.8.131.52 PAE = 0 XEN = 0
The VERSION value must match that of the linux kernel tarball you downloaded (e.g., 184.108.40.206).
If you are building a kernel for an i386 system that has more than 4 GB, you'll need to set the PAE (page address extension) flag. This will name the resulting kernel kernel-PAE*rpm. If the anaconda installer detects more that 4 GB memory, then it will install the kernel-PAE RPM and not the kernel RPM.
PAE = 1
If you are building a kernel that contains Xen support, then set the XEN flag. This will name the resulting kernel kernel-xen*rpm.
XEN = 1
It is illegal to set both the PAE and XEN flags.
If you want to build a kernel that the installer will use, then you must unset both the PAE and XEN flags (the default configuration of version.mk). This will name the resulting kernel kernel*rpm.
If you want to build a custom kernel for both the installer and for the running system and the running system requires either the kernel-PAE or kernel-xen RPM, then you'll have to execute this procedure twice: once to build the installer kernel (PAE = 0 and XEN = 0) and once to build the kernel that will be used on the running system (PAE = 1 or XEN = 1).
Build the kernel:
# make rpm
Copy the resulting RPMs into the current distribution:
# cp ../../RPMS/<arch>/kernel*rpm /export/rocks/install/contrib/7.0/<arch>/RPMS/
Where <arch> is i386 or x86_64.
Rebuild the distribution:
# cd /export/rocks/install # rocks create distro
Test the new kernel by reinstalling a compute node:
# shoot-node compute-0-0
If the kernel works to your satisfaction, reinstall all the compute nodes that you want to run the new kernel.