Solved

RH7.x modules wont load for Adaptec duralan NIC at boot

Posted on 2001-07-17
13
454 Views
Last Modified: 2010-03-18
I have a server running redhat 7.0 and 7.1 (i switch between the 2) and in either version i can't get the NIC driver modules to load buring bootup. This causes my networking to respond in a manner such as:
eth0 delaying initialization [FAILED]
if after boot up i manually insmod the driver module it will load fine and then i can start my network and everything works fine... but during bootup it WILL NOT LOAD  arrggh
i have the module in :
/lib/modules/2.2.16-22/net
and this line in my /etc/modules.conf
alias eth0 starfire

as far as i can tell i have everything setup correctly  and the driver does work fine.. but it wont load the module automatically.

this might or might not have happened after failing out the network connection (we do stress testing here) so could it be a case of a file reporting the driver not working and thus not loading it anymore?

there are two modules that need to be loaded
pci-scan.o
starfire.o
both of these are listed in /etc/modules.conf  and in the appropriate dir (as listed above)

let me know what you think....
0
Comment
Question by:Somebody_else
  • 6
  • 4
  • 2
  • +1
13 Comments
 

Expert Comment

by:tuyennn
ID: 6292103
What the type of NIC you used ? may you goto BIOS setup and disable "PnP OS Installed" or use "Use Bios setup" (difference for others bios). and specify IRQ and Memory Range for NIC. Try config your NIC in both RH7.0 and 7.1 with specify IRQ and Mem has just been change.

In other case if NIC in PCI slot, change other slot and try again

Good luck
0
 
LVL 3

Author Comment

by:Somebody_else
ID: 6294947
if this was the problem would i still be able to load the modules manually and have the card work? if so i will try it but would rather not complicate the problem.
What it sounds like though is an answer to an IRQ conflict or bios conflict that would not allow the card to work at all......

 the NIC works fine, no conflicts, no problems.... if i manually load the modules by using
>insmod starfire.o

the problem is that the OS will not load the modules automatically for the NIC on bootup.

My NIC card is a Adaptec Duralan 60244.
thanks
0
 
LVL 1

Accepted Solution

by:
DanEgli earned 200 total points
ID: 6296257
You have a few options. I personally prefer to load drivers like NIC card drivers as part of the kernel directly, not modules (actually compile as part of the kernel). Then the driver is always avail. It's not like I'm going to UNLOAD the driver for my nic.

Failing that, you can try the following. I'll quote some files from a machine I setup:
(/etc/modules.conf)
alias eth0 eepro100
alias eth1 ne2k-pci

then depmod -a
or depmod eepro100; depmod ne2k-pci

that updates a file called /lib/modules/<kernel-ver>/modules.dep
important lines from that file:

/lib/modules/2.4.5/kernel/drivers/net/eepro100.o:


/lib/modules/2.4.5/kernel/drivers/net/ne2k-pci.o:       /lib/modules/2.4.5/kernel/drivers/net/8390.o

this tells modprobe that no other modules are needed to load the eepro100 driver, but the ne2k-pci driver requires the 8390 driver before it will load.


Failing this as an answer, try this and let me know if it works:

instead of doing insmod starfire.o, try:
modprobe eth0

that SHOULD load your eth0 driver. If it does, you can add that line to the top of the if-up script. Then when it is called for ifup eth0 that line runs.
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6297153
DanEgli says:

"I personally prefer to load drivers like NIC card drivers as part of the kernel directly, not modules (actually compile as part of the kernel). Then the driver is always avail. It's not like I'm going to UNLOAD the driver for my nic"


The problem with this solution is that it is not very scalable.  Also, the reason that you compile things as modules is not necessarily so you can unload them later, but is rather so you can minimize the size of your kernel in memory, particularly at boot-time (this is a *good* thing - if your kernel image gets too big, it won't boot)

I'm guessing perhaps you forgot to make sure to enable the following option when recompiling your kernel

CONFIG_KMOD

kmod replaced kerneld a while back (which is responsible for autoloading modules at run-time, as needed).  

Then, as long as you have a line in /etc/modules.conf that resembles something like:

alias eth0 starfire

you should be good to go, as long as your modules.dep file has been generated correctly (see Dan's advice in this area - you will need to modify his example to make starfire.o dependant on pci-scan.o).  In fact, lacking this dependancy could be the entire problem, and is quite likely if you've never recompiled the kernel.  If you can tell me the version of your kernel (run 'uname -r'), I can give you a line verbatim to append to your modules.dep file...

Another common fallacy is that you need to compile all drivers into the kernel that will be needed at bootup (i.e. the drivers for a scsi device that contains the boot media).  Proper use of mkinitrd renders [compilation of drivers directly into the kernel] unnecessary.  

Dan's solution should work, but I'd try to avoid modifying the startup scripts.  Do yourself a favor and make it work the right way (autoloading of modules) rather than throwing hacks/workarounds at it.  Your eventual config will be much cleaner and more easily administerable.

-Jon




0
 
LVL 3

Author Comment

by:Somebody_else
ID: 6299303
sweet   these comments look really promising  i will be working on this today and let you know shortly if it provides the necessary solution
0
 
LVL 1

Expert Comment

by:DanEgli
ID: 6299880
While I agree with most everything that The--Captian said, I'm wondering how he got mkinitrd to load the scsi driver or the raid driver? I don't use initrd (boot ram disks) because I can never make them work. They always try and mount the file systems BEFORE loading the drivers (scsi or raid).
0
New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

 
LVL 16

Expert Comment

by:The--Captain
ID: 6299995
mkinitrd -v --ifneeded /boot/initrd-2.x.y-z.img

where x.y.z are the appropriate version numbers for your kernel.

the '--ifneeded' option only works if you have conf.modules set up properly (i.e. you already have the modules for your scsi/raid/etc properly loading through there).  A fresh install of redhat onto a scsi device should do this for you (set up conf.modules).

The '-v' option will tell you if it loaded the drivers it should.

You can force mkinitrd to include specific modules using the '--with=' option, but I've found this to be totally unnecessary, since even if you get the right drivers into the ramdisk this way, the boot will still fail because conf.modules doesn't tell the kernel to load the right drivers again later...

Most folks have problems here (making mkinitrd work for them) because they don't alter the version string of their newly compiled kernels (causing all sorts of headaches due to confusion/conflicts between the old kernel's files (ramdisk, mapfile, etc) and the one that was just compiled.  To alter the version string, just edit the appropriate spot in the main kernel src makefile.  Another bonus of this technique is that you also get a completely seperate modules directory for your new kernel (rather than overwriting the old ones).

Just so you know this isn't all a bunch of theorization - I've made linux root filesystem run from an md (soft raid) device this way.

Keep banging on it, Dan - it's really not as nasty as it seems once you start fiddling with it - it admittedly took a bit of trial-and-error on my part to get it working the first time, but now it's a breeze.  Just be sure to keep your old kernel around to fall back on (obviously), and remember 'lilo -R' is your friend if you have to do this remotely.

-Jon

P.S.  Prior to realizing the above techniques, I must admit I was always a bit mystified about how the linux installer could install root onto a scsi device and make it work.  Alas - no magic, just sneaky use of ramdisks...


0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6300016
Somebody else - ok, time for me to feel silly - I didn't notice you already posted which kernel version you were using.

Be sure you have a line in modules.dep that looks like:

/lib/modules/2.2.16-22/net/starfire.o:       /lib/modules/2.2.16-22/net/pci-scan.o

This tells the module utilities (which are doing the autoloading of your modules, hopefully) that starfire.o requires pci-scan.o to be loaded.

-Jon
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6300029
BTW, I don't have pci-scan.o on my system, so I just used the same directory as the starfire module in the above example - pci-scan might actually be in /lib/modules/2.2.16-22/misc or another directory - if it is, be sure to adjust the above example accordingly.

-Jon
0
 
LVL 3

Author Comment

by:Somebody_else
ID: 6303169
ooh that is a good point  cap.  i will be trying out the system today.. i couldn't earlier cuz someone was using it :-(   but it is free today so stay tuned and i'll let you know what i come up with  :-)
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6303524
I eagerly await the results...

-Jon

0
 
LVL 3

Author Comment

by:Somebody_else
ID: 6303766
YAY   that seems to have fixed it and now they are loading at startup!!!!  at first it didn't seem to work, i had done all the steps but still no boot, then i realized that this installation has had 2 kernels installed on it for a dual boot of linux, so i had to copy my /lib/modules/2.2.16-22/modules.dep
over to
/lib/modules/2.2.16-22/modules.dep

after i did that, viola it loaded fine... although it still returns the message:
can't locate module eth0

when i do a
modprobe eth0

im not sure why but i guess i shouldn't be worried about it if the modules are still loading at startup and it seems to be working fine (ping, hostname resolved etc...)

I want to thank you both for your help but since i am a newbie and dont care about who posted first or who helped me the most i am awarding the points to tuyennn



hehehe  jk    DanEgli since you were the first responder with a working solution, the points go to you, i would also like to thank you captain for helping/trying to clarify Dan's post as well as trying to help with the solution via command line examples.... i am shortly going to post a question about samba and how to make sure the smb service loads automatically when booting so if you can help i'd love to award you some points...
thanks again to all that helped me to find a solution!!!

Somebody_else
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6303824
Next time, try splitting points by posting a zero-point question in the CS forum linking back here that specifies how many points you wish to award to each expert.

I must admit that I find the current all-or-nothing approach to points in EE to be rather frustrating at times.  Glad to have helped, but bummed to have not received any points (particularly since I think my comments regarding modules.dep has eventually lead to the solution)...

-Jon

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now