[OpenAFS] Building openafs 1.6.15 on old ("precise") kernels

Benjamin Kaduk kaduk@MIT.EDU
Fri, 6 Nov 2015 22:36:56 -0500 (EST)

On Thu, 5 Nov 2015, John Tang Boyland wrote:

> Dear OpenAFS,
>    We're trying to update our "precise" ubuntu systems with
> openafs-1.6.15.  The standard distributions don't have recent
> Openafs (esp. 1.6.15) and the launchpad PPA apparently doesn't
> work with this old kernel (something about C library, I think).
> (It works for "trusty" but not "precise")

This is not really an answer to your question, but have you considered
using the openafs from Debian?  wheezy-security has been updated with the
security patch from 1.6.15 already.

>    I tried to build from source (./configure --with-linux-kernel-packaging)
> with simple "make; make install".  The new kernel module
> was placed in /lib/modules/2.6.32-5-amd64/extra/openafs/openafs.ko
> leaving the old kernel module in /lib/2.6.32-5-amd64/fs/openafs.ko.
> Barging ahead, I unwisely moved the new kernel module into the place
> where the old kernel was, and restarted openafs-client.  The kernel
> seg-faulted badly with very little information:
> ...
> Message from syslogd@lager at Nov  5 20:07:10 ...
>  kernel:[1161607.941495] invalid opcode: 0000 [#1] SMP
> Message from syslogd@lager at Nov  5 20:07:10 ...
>  kernel:[1161607.941499] last sysfs file:
>  /sys/devices/virtual/bdi/afs/uevent
> ...
> The machine was unresponsive and had to be rebooted
> in single-user mode and the module removed.
> So it seems that:
> (1) The directions to just "make install" doesn't work,

I believe it is supposed to work.

> and
> (2) I built the new kernel module wrong.  "make" doesn't do the job.

One possibility that comes to mind (but I cannot say with any confidence
that you have run into it) is that you built an openafs kernel module
against a different kernel than you are running; I think I've seen that
cause the type of crash you saw.

> Are there some instructions I should be following rather than
> http://wiki.openafs.org/HowToBuildOpenAFSFromSource/ ?

That said, just "make install" is not going to get you any integration
with the distribution's package management, and could cause problems if
you ever do try to get back onto a packaged version.  I would recommend
trying to rebuild the .deb packages yourself over a manual build from

So (from memory), that's:

apt-get source openafs
[which will make a directory like openafs-1.6.15 for you]
apt-get install devscripts build-essential
apt-get build-dep openafs
cd openafs-1.6.15
[wait many minutes for the build to complete]
cd ..
dpkg -i openafs-client_1.6.15_amd64.deb openafs-modules-dkms_1.6.15_amd64.deb openafs-krb5_1.6.15_amd64.deb

Things can get more complicated if you want to apply local patches before
building, but a clean rebuild should be fairly straightforward.