getting kickstart to use "extra" instead of "updates" for driverdisk

Doug Knight sxdck at email.alaska.edu
Tue Jul 15 23:19:23 UTC 2008


I doubt there is any way to tell anaconda to copy your driver to any
directory other than updates, short of modifying the anaconda code in
the updates tree.  Someone feel free to chime in here if they know
otherwise.

/sbin/weak-modules specifically looks in /lib/modules/*/extras for
modules.  There is no way to reconfigure this; at least not with
the RHEL 5 version I'm looking at.

Moving your driver into the extras directory like that won't do what
you're wanting without some additional work.

First, the system won't be able to find your module again until you update
the dependency list.  The 3w-9xxx module is probably already packaged and
loaded in the initrd, so you won't see any problems unless you rebuild your
ramdisk or unload the module for some reason.

Second, the search order (in /etc/depmod.d/depmod.conf.dist is "search
updates extra built-in weak-updates".  Your module will be loaded out of
updates or extras until you update your kernel, at which point it will be
linked into weak-updates in the new tree, which has lower priority than the
built-in modules.  The driver that ships with the distro will be loaded
(and packed in the initrd) instead of your copy in weak-updates after
updating the kernel.

To fix this you're going to have to use the override depmod directive to
tell depmod that you want to use the 3w-9xxx module out of the
weak-updates directory.  Something like "override 3w-9xxx *
weak-updates/3w-9xxx" should do what you want.

Personally, I'd recommend leaving the module where anaconda puts it, and
building an rpm for the driver then installing that with kickstart.  That
way you can easily update and manage the driver when updates come out in
the future.  If you want more information on how to properly build the
spec file for a kernel driver, Jon Masters has some very useful
information at http://driverupdateprogram.com/ .

Good Luck,
  Doug

Eric Pearce wrote:
> I have a system where I need to load a driver newer than the one that
> comes with the distribution.  This is the 3w-9xxx.ko driver for the
> 3Ware 9690 SAS controller and is in
> /lib/modules/2.6.18-53.el5/modules/kernel/drivers/scsi. I have following
> line in my kickstart config that loads a newer version of this driver
> using an image of a driver disk:
> 
>    driverdisk
> --source=http://installserver/RHEL-5.1-SERVER-X86_64/images/dd.img
> 
> This works fine, and newer driver ends up in
> /lib/modules/<kernelname>/updates.  I can see this happen in the
> anaconda.log file:
> 
> 17:42:32 INFO    : modules to insert 3w-9xxx
> 17:42:32 INFO    : module 3w-9xxx found on driver disk 3ware Storage
> Controller Driver Disk
> 17:42:32 INFO    : loaded 3w-9xxx from /tmp/ramfs/DD-0/modules.cgz
> 17:42:34 INFO    : inserted /tmp/3w-9xxx.ko
> 17:42:58 WARNING : Didn't find any package providing module 3w-9xxx
> 10:48:02 INFO    : running: 'cd /mnt/sysimage/lib/modules; gunzip <
> /tmp/ramfs/DD-0/modules.cgz | /mnt/sysimage/bin/cpio --quiet -iumd
> 2.6.18-53.el5/x86_64/3w-9xxx.ko  2.6.18-53.el5/3w-9xxx.ko '
> 10:48:02 INFO    : moving
> /mnt/sysimage/lib/modules/2.6.18-53.el5/x86_64/3w-9xxx.ko to
> /mnt/sysimage/lib/modules/2.6.18-53.el5/updates/3w-9xxx.ko
> 
> The problem is that subsequent kernel updates run the /sbin/weak-modules
> command, which expects the driver to be in
> /lib/modules/<kernelname>/extra (and seems to ignore the "updates"
> directory).  The result is that the newer driver never gets linked to
> subsequent kernels.  At the moment, I use the following in my kickstart
> config to address this:
> 
>    %post
>    mv /lib/modules/2.6.18-53.el5/updates/3w-9xxx.ko
> /lib/modules/2.6.18-53.el5/extra/
> 
> Is there a way to get kickstart to use the "extra" directory instead of
> "updates" ?    I'm assuming that I can't easy change the behavior of
> /sbin/weak-modules or /sbin/new-kernel-pkg.
> thanks
> -e
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list




More information about the Kickstart-list mailing list