I have a situation where I need to use a non-standard kernel module in place of one that comes with the RedHat 8.0 distribution, and I'd like to know the "right" way to achieve this. The module is a device driver for a Qlogic fibre host bus adapter. The reason for the special module is that the one that RedHat supplies does not handle all the fibre configurations we (EMC) need for an EMC/Clariion array. Here's what I've done thus far. 1. I have written an rpm to build the module from source and install it. I have given the module a unique name so it won't conflict with the kernel rpm file. 2. Once installed, I can run depmod, rmmod (on the old module) and modprobe (on the new module). (If I reboot, I don't need to run depmod.) Everything looks fine at this point, and I know I could put the appropriate commands (rmmod & modprobe) into /etc/rc.d/rc.local, but I'm wondering if there is something cleaner. One thing I tried (with no success) was to modify /etc/modules.conf **************** Old: alias scsi_hostadapter1 qla2200 New: alias scsi_hostadapter1 newmodule **************** I thought that this was the line that was making the standard module (qla2200) load. I found that qla2200 loaded even after my change, and the newmodule did not load. Suggestions? TIA, Bill
On Tue, 8 Oct 2002, Bill Mills-Curran wrote:
Date: Tue, 8 Oct 2002 21:23:36 -0400 (EDT) From: Bill Mills-Curran <subssn594@charter.net> Reply-To: wlug@mail.wlug.org To: Worcester Linux Users Group <wlug@mail.wlug.org> Subject: [Wlug] loading modules
I have a situation where I need to use a non-standard kernel module in place of one that comes with the RedHat 8.0 distribution, and I'd like to know the "right" way to achieve this.
The module is a device driver for a Qlogic fibre host bus adapter. The reason for the special module is that the one that RedHat supplies does not handle all the fibre configurations we (EMC) need for an EMC/Clariion array.
Here's what I've done thus far.
1. I have written an rpm to build the module from source and install it. I have given the module a unique name so it won't conflict with the kernel rpm file.
2. Once installed, I can run depmod, rmmod (on the old module) and modprobe (on the new module). (If I reboot, I don't need to run depmod.)
Everything looks fine at this point, and I know I could put the appropriate commands (rmmod & modprobe) into /etc/rc.d/rc.local, but I'm wondering if there is something cleaner.
One thing I tried (with no success) was to modify /etc/modules.conf
**************** Old:
alias scsi_hostadapter1 qla2200
New:
alias scsi_hostadapter1 newmodule ****************
I thought that this was the line that was making the standard module (qla2200) load. I found that qla2200 loaded even after my change, and the newmodule did not load.
Suggestions?
TIA, Bill
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
Could /etc/sysconfig/hwconf be the right place to fix this? Bill
subssn594> Could /etc/sysconfig/hwconf be the right place to fix this? The module might be loading in the initial ramdisk. After changing modules.conf try creating a new one: mkinitrd /boot/initrd-2.4.18-14 2.4.18-14 You can take a look at that script to see how it discovers which module to load. It is pretty tricky and does call kudzu, so maybe the hwconf thing is right. -- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886
Charles> You can take a look at that script to see how it discovers Charles> which module to load. It is pretty tricky and does call Charles> kudzu, so maybe the hwconf thing is right. Actually, why don't you just replace the existing non-working RedHat module with yours? John
On Wed, Oct 09, 2002 at 09:46:38AM -0400, John Stoffel wrote: stoffel> Actually, why don't you just replace the existing non-working RedHat stoffel> module with yours? Because that is rude and your module breaks everytime you upgrade to a new RH kernel? You could always submit your module to Red Hat for inclusion in the next release... -- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886
On Wed, 9 Oct 2002, Charles R. Anderson wrote:
Date: Wed, 9 Oct 2002 08:52:04 -0400 From: Charles R. Anderson <cra@WPI.EDU> Reply-To: wlug@mail.wlug.org To: Worcester Linux Users Group <wlug@mail.wlug.org> Subject: Re: [Wlug] loading modules
subssn594> Could /etc/sysconfig/hwconf be the right place to fix this?
The module might be loading in the initial ramdisk. After changing modules.conf try creating a new one:
mkinitrd /boot/initrd-2.4.18-14 2.4.18-14
You can take a look at that script to see how it discovers which module to load. It is pretty tricky and does call kudzu, so maybe the hwconf thing is right.
-- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
It's working!!! Here's what I found... 1. /etc/sysconfig/hwconf is written at boot time. I have no idea what part of the boot sequence writes it, but the modification date suggests that it's very early. 2. I had to modify the line in /etc/modules.conf before running mkinitrd. This was special because the HBA is seen as a SCSI device. For other devices, the --preload=module and --with=module options would probably work. mkinitrd is a script, so you can read it to see where it's getting data. After booting, lsmod showed that the right module was loaded. Charles, thanks for the great hint. Bill
On Tue, Oct 08, 2002 at 09:23:36PM -0400, Bill Mills-Curran wrote: subssn594> alias scsi_hostadapter1 newmodule subssn594> subssn594> I thought that this was the line that was making the standard module subssn594> (qla2200) load. I found that qla2200 loaded even after my change, and subssn594> the newmodule did not load. Are there any other SCSI devices in the system? Do those other HBA's use the qla2200 driver? -- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886
participants (3)
-
Bill Mills-Curran
-
Charles R. Anderson
-
John Stoffel