LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2005, 04:59 PM   #1
rosspet
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
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.
 
Old 08-02-2005, 06:31 PM   #2
vredfreak
Member
 
Registered: Oct 2004
Location: Arkansas
Distribution: Crux, PCLinuxOS
Posts: 31

Rep: Reputation: 15
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.
 
Old 08-03-2005, 02:14 AM   #3
rosspet
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Original Poster
Rep: Reputation: 0
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.
ntfs

............................. (many modules listed)
ipw2200
............................. (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.
 
Old 08-03-2005, 06:38 AM   #4
vredfreak
Member
 
Registered: Oct 2004
Location: Arkansas
Distribution: Crux, PCLinuxOS
Posts: 31

Rep: Reputation: 15
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.
 
Old 08-06-2005, 01:09 PM   #5
vredfreak
Member
 
Registered: Oct 2004
Location: Arkansas
Distribution: Crux, PCLinuxOS
Posts: 31

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Automating Modprobe gauntalus Linux - Wireless Networking 4 01-14-2005 10:57 AM
Automating simple commands, scripting or programming? entob *BSD 3 09-01-2004 01:56 AM
modprobe, iwconfig, lsusb and other missing commands dubya Linux - Newbie 3 05-04-2004 09:27 PM
lsmod and modprobe commands rock9604 Linux - Newbie 10 05-02-2004 11:35 PM
Automating modprobe? r_jensen11 Linux - Hardware 3 09-07-2003 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:15 AM.

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