Custom kernel not (auto)loading capabilities modules

Markus Kolb ubuntu-ml at tower-net.de
Thu Dec 23 19:51:08 UTC 2004


On 23.12.2004 17:20, Markus Kolb schrieb:
[...]
>>> I'm currently using a custom kernel (built using kernel-package) with
>>> both capability and commoncap enabled as modules, but when I boot I get
>>> the following error message from the init scripts:
>>>
>>> <snip>
>>>  * Starting system message bus... [OK]
>>>  * Starting Hardware absatraction layer...
>>> 00:22:08.204 [W] hald.c:301: Your kernel does not support capabilities;
>>> some features will not be available
>>>  * Starting file alteration monitor... [OK]
>>> </snip>

I have the solution myself.
The Ubuntu kernel images are not built with make-kpkg.
You have to use the source package which you'll get with apt-get source 
linux-image-2.6.8.1-4-k7 for example.
This will download a gzipped tarball, the description file (.dsc) and 
the the gzipped Ubuntu diffs. Then everything will be extracted and you 
have to build a package like every other non-kernel-deb-package.
There are documents on how to build a deb in the web.
One remark on patching that source. You have to use the Debian-way. 
There are a lot of dpatch-files in <kernel-source>/debian/patches which 
will get included in the source during build process.
So don't make manual patches to the source yourself because there can be 
problems when the package build tries to patch the dpatches over your 
own patches.
If you do it this way then there will be no problem with startup.

But if you've used make-kpkg you can correct it very simple.
Start with your custom kernel and do following:

$ sudo mkdir /lib/modules/`uname -r`/boot/
$ sudo cp -a \
/lib/modules/`uname -r`/kernel/security/capability.ko \
/lib/modules/`uname -r`/boot/ && \
sudo mkinitrd -o /boot/initrd.img-`uname -r` `uname -r`

I am not 100% sure if you have to make a new initrd.img but it doesn't 
matter if you do to be sure.

If you use a bootloader not handling changes by itself (e.g. lilo) you 
have to tell it about the new initrd.img.

There are more differences between the two kinds of kernel-build but 
it's not part of this subject.

Markus




More information about the ubuntu-users mailing list