LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2011, 02:42 PM   #1
Vincanis
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
Modprobe fails in script


Hey everyone, I am running into a problem with a script I have to load the proper ethernet drivers on the script start, but the modprobe command fails.

I don't know exactly what it says but I believe it was something to the effect of "cannot find (x)." Which would be fine if it did it all of the time, but if I ctrl+c out of the script and attempt to do the command manually it works.

Anyone out there know what might be going on? I've been searching google and stackoverload and here and haven't come across anyone else having this issue.

Or better yet, is there a way to have a shell script implement a .rules file for a specific instance?

Last edited by Vincanis; 06-15-2011 at 03:12 PM.
 
Old 06-15-2011, 03:13 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Vincanis View Post
Hey everyone, I am running into a problem with a script I have to load the proper ethernet drivers on the script start, but the modprobe command fails.

I don't know exactly what it says but I believe it was something to the effect of "cannot find (x)." Which would be fine if it did it all of the time, but if I ctrl+c out of the script and attempt to do the command manually it works.

Anyone out there know what might be going on? I've been searching google and stackoverload and here and haven't come across anyone else having this issue.
Well, without any real details, there's no way anyone here can help you. Version/distro of Linux? Which ethernet drivers? Source of the script? What the script is trying to do and why? The actual error message??? Anything??
 
Old 06-15-2011, 03:29 PM   #3
Vincanis
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Running Knoppix 6.2, it is supposed to remove (if they exist) pcnet32 and mii, then load e1000, igb and e1000e

the part of the script that fails is:

rmmod pcnet32
rmmod mii
modprobe e1000
modprobe igb
modprobe e1000e

The error is:
FATAL: Module <driver> not found

After this, the script goes into testing whether the ethernet ports are disconnected and displays it to a LCD screen on the machine as long as it's unplugged. However different units have different eth port numbers assigned to the eth ports. You can get by this by setting up a 70-persistent-net.rules file in the rules.d folder but then it makes it obsolete for all but one type of machine.

So I suppose is there a way to change these rules while in a shell script? or any way to explain why the script doesn't see the drivers but the terminal will work?
 
Old 06-16-2011, 10:22 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Vincanis View Post
Running Knoppix 6.2, it is supposed to remove (if they exist) pcnet32 and mii, then load e1000, igb and e1000e

the part of the script that fails is:

rmmod pcnet32
rmmod mii
modprobe e1000
modprobe igb
modprobe e1000e

The error is:
FATAL: Module <driver> not found

After this, the script goes into testing whether the ethernet ports are disconnected and displays it to a LCD screen on the machine as long as it's unplugged. However different units have different eth port numbers assigned to the eth ports. You can get by this by setting up a 70-persistent-net.rules file in the rules.d folder but then it makes it obsolete for all but one type of machine.

So I suppose is there a way to change these rules while in a shell script? or any way to explain why the script doesn't see the drivers but the terminal will work?
The first obvious question is how is that script getting run initially? Is it part of your boot-up sequence? If so, have you considered dropping it down to a lower part, perhaps after everything in the system is already up? Could be that a partition isn't mounted where the modules are located, and it's dying there. After the system comes up and gives you a terminal, it works since it can find everything. Just a guess, though. And is that script running as root?

If you've got all the modules where you want them, try to run a "depmod -a", then see if it works.
 
Old 06-16-2011, 10:26 AM   #5
Vincanis
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
It's the knoppix.sh script in /mnt-system/KNOPPIX/

It automatically starts after the entire system goes through loading all of the drivers and such. Instead of going into a GUI, it stays in a text-only mode until the script is done (in this case, it constantly repeats).
 
Old 06-16-2011, 03:07 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Vincanis View Post
It's the knoppix.sh script in /mnt-system/KNOPPIX/

It automatically starts after the entire system goes through loading all of the drivers and such. Instead of going into a GUI, it stays in a text-only mode until the script is done (in this case, it constantly repeats).
Can you post the script? If it's just sitting there, there must be some sort of error-checking/handling that's making the script just loop and/or die. Perhaps putting in a full path to the modprobe command and/or the module itself? Did a the "depmod -a" do anything?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modprobe ndiswrapper fails android6011 Linux - Software 4 10-19-2006 07:34 AM
modprobe emu10k1 fails, but i have it! liquidrabbit Linux - Hardware 18 05-01-2006 03:54 PM
nvidida fails to modprobe Battousai Linux - Newbie 3 01-27-2005 04:19 PM
Modprobe vt8231 fails Ion42 Linux - Software 0 07-26-2004 04:14 AM
modprobe usb fails aclassic Linux - Hardware 3 06-11-2003 10:27 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration