University Computing Systems
Systems Administration - Building AFS kernel modules for Linux
General Information
For every Linux kernel version and type that is to be used, an AFS kernel
module needs to be built for each. Currently supported kernel types are :
kernel and kernel-smp for both x86 and x64 machines.
There is no support yet for kernel-hugemem (used for machines with 16GB+ of RAM).
This kernel is not yet supported by the OpenAFS client.
Building an AFS kernel module
To build an AFS kernel module :
1. Disable the AFS client via chkconfig
- chkconfig openafs-client off
2. Change the default run level from 5 to 3
- /afs/cad/linux/admin/install/scripts/KS/chginit 3
3. Install the Linux kernel versions and types for all AFS modules which
are to be built. A corresponding development kernel will be needed for
each, so be sure to install the development version of the kernel type
also. The kernel types can be installed either directly from rpm or
using up2date.
Using the up2date method :
- up2date -f kernel kernel-devel kernel-smp kernel-smp-devel
RPM method :
- cd /path/to/kernelrpms
- rpm -ivh kernel*
4. Reboot using the new kernel which was just installed
- shutdown -r now
5. Mount viridian
- mkdir /mnt/viridian
- mount viridian:/jumpstart /mnt/viridian
6. Rebuild the source RPM.
(for x86 machines, only the kernel module RPM is built, but for x64
machines, the entire OpenAFS suite is built, even though we only
are interested in the kernel RPM. This does no harm other than
taking a little longer.)
- cd /mnt/viridian/modules/openafs_linux/SRPM
- rpmbuild --rebuild --target=‘uname -m‘ <OPENAFS_RPM>
7. After the module has finished building, the resulting rpm will be located
in /usr/src/redhat/RPMS/‘uname -m‘
Repeat steps 4-7 for each type of kernel module you wish to build.
8. After building kernel modules for both kernel and kernel-smp the resulting
RPMs should be copied on to viridian.
- cd /jumpstart/modules/openafs_linux/‘uname -i‘_RHEL<VERSION>/RPM_v<AFS_VERSION
VERSION = RHEL VERSION, e.g., RHEL4
AFS_VERSION = AFS Version, e.g., 1.4.1
- mkdir kernel-<VERSION>
VERSION = KERNEL VERSION, e.g., kernel-2.6.9-42.0.10
- cp openafs-kernel*.rpm kernel-<VERSION>
Last updated: 5/14/2007