Patching kernel with aufs (riding a dead horse?)

Martin Thomas marthom at ymail.com
Mon Jun 15 21:36:40 CEST 2009


Hello list,

I hope this thread is still alive. 

Since the NICs of our new Dell Optiplex 960 are not supported by the Debian stock kernel, we have been forced to look for a solution how to get aufs into a newer kernel. For Linux 2.6.28.10, the following, which is mostly based on Michael's inspirations and the Debian Linux Kernel Handbook, worked out for us and might also help others. Any comments, especially advice for improvement, are/is highly appreciated.

1. From the configured pristine kernel sources linux-2.6.28.10 create the kernel package according to the handbook via:

   $ make-kpkg clean
   $ fakeroot make-kpkg --initrd --revision=build.1.0 kernel_image

2. Then download and install the testing(!) version of aufs-source.

3. Make the aufs-module package for the built kernel via:
   
   # m-a -k <path/to/linux-2.6.28.10> -l 2.6.28.10 build aufs-source

4. Put the two created packages into a local repository which you have access to from the chroot environment 
generated during the build process of the nfsroot,
e. g. via http, and add the repository to the FAI sources.list, e.g. via:

   # echo "deb http://<host_with_repository>/<repository> lenny main" >> /etc/fai/apt/sources.list

5. Add kernel image and aufs-modules package to /etc/fai/NFSROOT and remove the stock versions of both packages usually to be found there.

6. Rebuild the nfsroot via fai-setup -v.

7. Now you should find both the built kernel and an appropriate initrd in the tftproot. 
   You can check whether the latter has aufs support via:

   $ zcat initrd.img-2.6.26.10 | cpio -i.

   In lib/modules/2.6.28.10/kernel/fs/aufs there should be the aufs module.

8. You can now install your clients, for example with

   # fai-chboot -s2.6.28.10 <client> -IFv.

If you want your clients to install the customized kernel too, add the created kernel image to the corresponding package list in $CONFIGSPACE/package_config (and remove the old one).

Hope this helps.

Martin
   


      



More information about the linux-fai mailing list