ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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??
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?
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.
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).
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.