-   Linux - Networking (
-   -   Automating modprobe commands (

rosspet 08-02-2005 04:59 PM

Automating modprobe commands
I have currently moved from Kanotix 2005-2 (kernel 2.6.7) to Kanotix 2005-3 (kernel 2.6.11). I had no problems with my wireless card under 2005-2 (I am running a Toshiba Satellite A80-129). I went to 2005-3 just to have a newer system. What surprised me though was that 2005-3 cannot detect my wireless card (like 2005-2 did). In order to make it work I need to do the following in the console:

modprobe -r ipw2200
modprobe ipw2200
ifup eth2

Then all works well. However, I need to automate this. There is surely a way to do it. Please, help.

Just to add some more info: My wireless card was recognised as eth0 under Kanotix 2005-2, however, with the 2005-3 it was initially recognised as eth1. Then I was adviced to install hotplug and now it is recognised as eth2. Also, KSysGuard tell me that ipw2200 is not loaded once the system is up and running (although during boot-up it says "ipw2200 detected").
I am comparatively new to Linux (and have no technical background) so I cannot judge whether this has any importance.

So, again, my request is if anybody can help me with how to make the above 3 (modprobe) lines automatically run upon boot. Just to add that ipw2200 is included in etc/modules.

Thanks in advance.

vredfreak 08-02-2005 06:31 PM

I don't understand why you have to remove the module (modprobe -r), then reload it, though. Does simply loading the module not work?

As for connecting, you can edit a startup script file, such as rc.local and add the command in there (don't know exactly the file setup of Kanotix). Just add your ifup command in there.

rosspet 08-03-2005 02:14 AM

Thanks vredfreak. I am also puzzled but doing only modprobe ipw2200 followed by ifup eth2 gives me the following:

root@box:~# modprobe ipw2200
root@box:~# ifup eth2
Error for wireless request "Set Mode" (8B06) :
SET failed on device eth2 ; No such device.
Error for wireless request "Set Encode" (8B2A) :
SET failed on device eth2 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device eth2 ; No such device.
SIOCSIFADDR: No such device
eth2: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
eth2: ERROR while getting interface flags: No such device
Failed to bring up eth2.

So, I always have to remove the module first and then load it again. As I mentioned the module is included in the startup line-up, however, KSysGuard does not show it as loaded.

As for the rc.local, I have seen suggestions for changing this in forum messages, however, Kanotix does not seem to have such a file (and as a newbie I do not really know which file qualifies as a startup script file).

I have a folder "etc/rc.boot" but it is empty (no files or subfolders in it).
I have a file ect/modules which contains ipw2200. See below partly the contents of this file:

# /etc/modules: kernel modules to load at boot time.
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a '#', and everything on the line after them are ignored.

............................. (many modules listed)
............................. (other modules listed)

This is as much as I know and understand the system. As I mentioned, with a previous version of Kanotix (2005-2) I had no problems. In fact, I still have it on another partition and a couple of days ago I copied the whole folder "etc/" from the previous Kanotix to the new one hoping that this little trick may make the system work. It did not. I had to delete it and restore the previous etc/ folder.

So, I am still waiting for advice on what to do. This is all confusing to me but is a good learning experience.
Thanks again in advance.

vredfreak 08-03-2005 06:38 AM

Did you add the driver to /etc/modules, or did Kanotix? It may be possible that the module is being loaded before the card is detected. Maybe move the "ipw2200" to the end to make it the last module loaded. Just a shot in the dark, though.

vredfreak 08-06-2005 01:09 PM

Don't know if you're still following this, but:

I just read a thread on a different forum about a similar problem that stated that it is a known issue with the kernel 2.6.9 that hotplug times out too soon to detect your card. This forces you to unload, then reload the module. I know you're not using this kernel, but you may look into the hotplug theory.

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