[CentOS-devel] Building latest kmods for latest kernel automatically

Tue Nov 18 22:23:19 UTC 2008
Akemi Yagi <amyagi at gmail.com>

On Tue, Nov 18, 2008 at 2:07 PM, Akemi Yagi <amyagi at gmail.com> wrote:
> On Tue, Nov 18, 2008 at 1:55 PM, Fabian Arrotin

>> So what ? ;-)
>> Simple example : i'm a new sysadmin and i've recently installed a clean
>> CentOS 5.2 on which i've directly made updates. So (at this time) i'm
>> running with kernel-2.6.18-92.1.18.
>> Two days after i'm interested in installing kmod-drbd82 and , surprise,
>> there is not kmod-drbd82-`uname -r` available in the centos extras repo ..
>> weak-updates is 'invoked' after each kernel update so that kmod installed
>> (and correctly located in the 'extras' directory) will be linked for the
>> newly installed kernel.
>> But that will not solve the problem for people only wanting to start using a
>> specific kmod with the latest kernel already installed .. or am i missing
>> the point ?
>
> Weak-updates, when invoked, will look for *all* kABI compatible
> kernels on a given system and create a symlink for each one of them.
> (is my understanding)
>
> Akemi

Alright.  I just did a small test run.

[yagi2 at nova7 ~]$ rpm -q kmod-drbd
package kmod-drbd is not installed
[yagi2 at nova7 ~]$ uname -a
Linux nova7 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 19:32:05 EDT 2008
x86_64 x86_64 x86_64 GNU/Linux
[yagi2 at nova7 ~]$ rpm -q kernel
kernel-2.6.18-92.el5.x86_64
kernel-2.6.18-92.1.13.el5.x86_64

<So, the system does not have kmod-drbd and has kernel 2.6.18-92.1.13.>

[root at nova7 ~]# yum install kmod-drbd

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kmod-drbd               x86_64     8.0.13-2         extras            794 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 794 k
Is this ok [y/N]: y

<kmod-drbd has been installed on the system successfully>

[yagi2 at nova7 ~]$ ls -l `find /lib/modules/ -name drbd.ko`
-rw-r--r-- 1 root root 2874444 Oct  3 08:13
/lib/modules/2.6.18-92.1.13.el5/extra/drbd/drbd.ko
lrwxrwxrwx 1 root root      50 Nov 18 14:47
/lib/modules/2.6.18-92.el5/weak-updates/drbd/drbd.ko ->
/lib/modules/2.6.18-92.1.13.el5/extra/drbd/drbd.ko

<The above result is what I expected>

Akemi