Keeping external kernel modules from being deleted
I've been enjoying my random system beeps, different every day. At least up until yesterday, when I didn't seem to have one. Today I didn't have one either, and discovered that was because the beep module was no longer loaded.
Why not? Well, I updated my kernel to tweak some ACPI parameters
(fruitlessly, as it turns out; I'm trying to get powertop to give
me more information but I haven't found the magic combination of
kernel parameters it wants on this machine) and so I did a
make modules_install
. And it seems that
make modules_install
starts out by doing
rm -rf /lib/modules/VERSION/kernel
which removed
my externally built beep module along with everything else.
I couldn't find documentation on this, but I did find Intel Wireless bug 556 which talks about the issue. Apparently somewhere along the way 2.6 started doing this rm -rf, but you can get around it by installing outside the kernel directory.
In other words, instead of
cp beep.ko /lib/modules/2.6.29.4/kernel/drivers/input/misc/do
cp beep.ko /lib/modules/2.6.29.4/drivers/input/misc/Then your external module won't get wiped out at the next
modules_install
.
I've let the maintainer of Fancy Beeper know about this, so it won't be a problem for that module, but it's a good tip to know about in general -- I'm sure there are lots of modules that hit this problem.
[ 10:30 Jun 24, 2009 More linux/kernel | permalink to this entry | ]