LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-20-2006, 02:32 PM   #1
DrLeary
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
How to start ndiswrapper on boot ++


Hi guys, I'm a complete n00b to linux so I need some serious basic lessons here...

I've got ndiswrapper installed and working, only problem is I need to load the module manually every time I start up and then I have to type in all the stuff like "iwconfig mode Managed" etc. I've been trying to figure out two things:

1. How do I load ndiswrapper automatically on boot? It says that typing "ndiswrapper -m" should do the trick, but this is not working. Also it writes to "/etc/modules.conf" and not "/etc/modprobe.conf" as stated in the wiki. Puting "alias wlan0 ndiswrapper" in both doesn't seem to do anything.

2. How can I run a script on startup that does all the wifi config like "iwconfig mode Managed" etc? It's a pain in the ass to have to type in all these things every time I reboot. I don't really know what any of these files in /etc/rc.d do or which ones are loaded or how they get loaded.

I've "given up" linux a couple of times before but this time I'm not going to be beaten by a machine!=) I guess what deterres me is evey time I try to get help from someone on irc or similar they just start shouting RTFM! and ban me before I can explain anything. I know you have to read the manual, but asking questions is so much more educational=)

Thanx
Oh and I'm running Slackware 10.2 full install
 
Old 03-20-2006, 03:05 PM   #2
xpromisex
Member
 
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447

Rep: Reputation: 30
Well, if you add all the commands you need to issue on boot to get ndiswrapper to work into /etc/rc.local, it will configure itself on bootup. You can do this, but you have to switch to the root user, and edit it.


If you don't know how to do this, open a command prompt and issue these:

Code:
bash$ su
password: (enter the password for the root user, it won't show up when you're typing - hit enter)
bash# nano /etc/rc.local

This should open a text file in the command prompt, most likely quite empty. Add the ndiswrapper commands for whatever you need for right after boot.

Hope this helps!
 
Old 03-20-2006, 03:08 PM   #3
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
There is a wireless script and wireless service which gets called by I think inetd or maybe inet1, but I've never found this to be a useful way to get the wireless up at boot - ie I've never been able to get it to work properly.

The way I did it was to just add the commands I'd normally need to bring up wlan0 to rc.local

eg:

Code:
iwconfig wlan0 essid <name>
iwconfig wlan0 key <key>
iwconfig wlan0 <any other stuff you need>
ifconfig wlan0 up
dhcpcd wlan0
You could call the ndiswrapper module from here too (before the iwconfig stuff), but that should work on boot if you installed it correctly.

Cheers
 
Old 03-20-2006, 03:32 PM   #4
DrLeary
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Okay puting these lines in rc.local seems to be the way to go, BUT it's still not loading ndiswrapper=( I tried putting "sudo modprobe ndiswrapper" and "modprobe ndiswrapper" before the iwconfig lines but when I boot up I get errors on the iwconfig lines saying wlan0 is unknown or unavailable. What am I doing wrong?

Is there another way to make sure ndiswrapper is running when I boot?
 
Old 03-20-2006, 03:48 PM   #5
__spc__
Member
 
Registered: Feb 2006
Location: Bridgend, Wales
Distribution: Kubuntu 10.04.25 (Feb 2011)
Posts: 172

Rep: Reputation: 30
I have Slackware 10.2 too.

My rc.wireless.conf file:

VERBOSE=1

case "$HWADDR" in

xx:xx:xx:xx:xx:xx) # MAC ADDRESS of NIC
INFO="Broadcom WLAN 802.11g on Laptop" # Blah blah...
ESSID="xxxx" # SSID
CHANNEL="1" # WiFi channel
MODE="Managed"
KEY="xxxxxxxxxx" # 10 char 64bit HEX WEP key
;;
esac


My rc.local file:

echo "running modprobe ndiswrapper"
modprobe ndiswrapper

echo "Initialising WLAN with 'dhcpcd wlan0'"
dhcpcd wlan0 -s 192.168.1.101 # The IP addresss I want for my WiFi connection

echo "initialising lisa daemon"
/opt/kde/bin/lisa
 
Old 03-20-2006, 04:07 PM   #6
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
You can check to see if the module is loaded by examining the output of

# lsmod

ndiswrapper module will be there if it's loaded.

The only reason I can think that iwconfig is not configuring wlan0 - if the ndiswrapper module is loaded - is that your wireless interface is not called "wlan0"

What's the output of

# iwconfig

Also check the output of

# dmesg | grep ndiswrapper
 
Old 03-20-2006, 04:26 PM   #7
DrLeary
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
This is really killing me! I'm now pretty sure ndiswrapper is running on startup since I can type iwconfig right after login and the wlan0 interface is right there, yet I still get errors when trying to start it up...

Code:
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local setup commands in here:
/sbin/modprobe ndiswrapper
iwconfig wlan0 mode Managed
iwconfig wlan0 key restricted s:xxx
iwconfig wlan0 essid default
ifconfig wlan0 up
dhcpcd wlan0
Code:
root@HAL-9000:~# lsmod
Module                  Size  Used by    Not tainted
ndiswrapper           153528   0
snd-pcm-oss            36736   0  (unused)
snd-mixer-oss          12376   0  [snd-pcm-oss]
usb-ohci               19368   0  (unused)
usbcore                59148   1  [ndiswrapper usb-ohci]
8139too                13928   0
mii                     2272   0  [8139too]
crc32                   2880   0  [8139too]
snd-emu10k1            78788   1
snd-hwdep               4352   0  [snd-emu10k1]
snd-util-mem            1136   0  [snd-emu10k1]
snd-ac97-codec         58556   0  [snd-emu10k1]
snd-pcm                54344   1  [snd-pcm-oss snd-emu10k1 snd-ac97-codec]
snd-timer              13764   0  [snd-emu10k1 snd-pcm]
snd-rawmidi            12480   0  [snd-emu10k1]
snd-seq-device          3812   0  [snd-emu10k1 snd-rawmidi]
snd                    32772   0  [snd-pcm-oss snd-mixer-oss snd-emu10k1 snd-hwdep snd-util-mem snd-ac97-codec snd-pcm snd-timer snd-rawmidi snd-seq-device]
soundcore               3396   6  [snd]
snd-page-alloc          4712   0  [snd-mixer-oss snd-emu10k1 snd-hwdep snd-pcm snd-timer snd-rawmidi snd-seq-device snd]
emu10k1-gp              1192   0  (unused)
gameport                1420   0  [emu10k1-gp]
pcmcia_core            39172   0
ntfs                   51232   1  (autoclean)
ide-scsi                9392   0
agpgart                45508   0  (unused)
Code:
root@HAL-9000:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11b  ESSID:"default"  Nickname:"HAL-9000"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0D:88:3E:FE:91
          Bit Rate=11 Mb/s   Tx-Power:20 dBm   Sensitivity=-100 dBm
          RTS thr=2347 B   Fragment thr=2346 B
          Encryption key:6669-6C74-6572-6E65-7474-6970-73   Security mode:restricted
          Power Management:off
          Link Quality:100/100  Signal level:-61 dBm  Noise level:-256 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
Code:
root@HAL-9000:~# dmesg | grep ndiswrapper
ndiswrapper version 1.10 loaded (preempt=no,smp=no)
ndiswrapper: driver rt2400 (Ralink,02/24/2004, 2.01.00.0000) loaded
ndiswrapper: using irq 11
wlan0: ndiswrapper ethernet device 00:08:a1:81:c0:1a using driver rt2400, 1814:0101.5.conf
Need some sleep now... Gotta get to work in a few hours. God damn what a bummer... Hope someone out there will have figured this out by the time I check in tomorrow. Thanx so far for the help. You people are much nizer than the selfproclaimed űber-gurus on irc

Last edited by DrLeary; 03-20-2006 at 04:34 PM.
 
Old 03-21-2006, 12:30 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,970
Blog Entries: 46

Rep: Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194
Quote:
Originally Posted by DrLeary
Hi guys, I'm a complete n00b to linux so I need some serious basic lessons here...

I've got ndiswrapper installed and working, only problem is I need to load the module manually every time I start up and then I have to type in all the stuff like "iwconfig mode Managed" etc. I've been trying to figure out two things:

1. How do I load ndiswrapper automatically on boot? It says that typing "ndiswrapper -m" should do the trick, but this is not working. Also it writes to "/etc/modules.conf" and not "/etc/modprobe.conf" as stated in the wiki. Puting "alias wlan0 ndiswrapper" in both doesn't seem to do anything.

2. How can I run a script on startup that does all the wifi config like "iwconfig mode Managed" etc? It's a pain in the ass to have to type in all these things every time I reboot. I don't really know what any of these files in /etc/rc.d do or which ones are loaded or how they get loaded.


I've "given up" linux a couple of times before but this time I'm not going to be beaten by a machine!=) I guess what deterres me is evey time I try to get help from someone on irc or similar they just start shouting RTFM! and ban me before I can explain anything. I know you have to read the manual, but asking questions is so much more educational=)

Thanx
Oh and I'm running Slackware 10.2 full install

Hi,

You could use the LQ tutorials to assist you;

http://www.linuxquestions.org/linux/...NDISWRAPPER_11

Sure this is for a different wireless card but the formula is the same and should get the desired results.

Your not installing correctly!

The ndiswrapper -m does write to the modprobe.conf and that is where it should be.

http://ndiswrapper.org/ #installation instructions

or

http://ndiswrapper.sourceforge.net/ #get the ndiswrapper

http://en.wikipedia.org/wiki/Ndiswrapper # a definition

As for RTFM statement. You will get more help if you know how to present your problem/question. I would suggest you to read some good on-line reference. A good start would be slackbasics (#3 in my sig)

Your statement;

Quote:
I've "given up" linux a couple of times before but this time I'm not going to be beaten by a machine!=) I guess what deterres me is evey time I try to get help from someone on irc or similar they just start shouting RTFM! and ban me before I can explain anything. I know you have to read the manual, but asking questions is so much more educational=)
Is not correct, you need to do a little earnest effort on your part. LQ is here to assist you if we can and will. The presentation of such a statement actually bothers me in that you are expecting or demanding resolution. Your attitude or as I stated above about presentation of the problem is important.

You could do some LQ searches and get loads of information. Heck google 'slackware ndiswrapper help please' gave well over 10K threads. And yes, you need to sift through to find the jewels.

BTW, the asking of intelligent questions is educational!
 
Old 03-21-2006, 04:19 AM   #9
DrLeary
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gwsandvik
As for RTFM statement. You will get more help if you know how to present your problem/question. I would suggest you to read some good on-line reference. A good start would be slackbasics (#3 in my sig)

...

Is not correct, you need to do a little earnest effort on your part. LQ is here to assist you if we can and will. The presentation of such a statement actually bothers me in that you are expecting or demanding resolution. Your attitude or as I stated above about presentation of the problem is important.

You could do some LQ searches and get loads of information. Heck google 'slackware ndiswrapper help please' gave well over 10K threads. And yes, you need to sift through to find the jewels.

BTW, the asking of intelligent questions is educational!
Thanks for the tips. Some usefull stuff=) But I feel I must make a comment just to clarify things. I was maybe a bit angry when I wrote that stuff, so for all the linux gurus out there who feel offended I apologize!=) Of course you must have better things to do than answer the same questions over and over again. I will try some RTFM and googling and hopefully I'll figure it out. You know it's pretty tough for a guy who's used to helping other people with silly computer problems (on windows) all the time to find himself in the other end of the dialogue, hehe. I mean I don't know ANYTHING about what files do what and where to put stuff. Anyway, thanks again, and hopefully I will be somewhat more enlightened in the time to come=)

And ofcourse I don't demand you to help me, although that is somewhat hard to see from a forum post. I strive to be humble, hehe=)
 
Old 03-21-2006, 09:33 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,970
Blog Entries: 46

Rep: Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194
Quote:
Originally Posted by DrLeary
Thanks for the tips. Some usefull stuff=) But I feel I must make a comment just to clarify things. I was maybe a bit angry when I wrote that stuff, so for all the linux gurus out there who feel offended I apologize!=) Of course you must have better things to do than answer the same questions over and over again. I will try some RTFM and googling and hopefully I'll figure it out. You know it's pretty tough for a guy who's used to helping other people with silly computer problems (on windows) all the time to find himself in the other end of the dialogue, hehe. I mean I don't know ANYTHING about what files do what and where to put stuff. Anyway, thanks again, and hopefully I will be somewhat more enlightened in the time to come=)

And ofcourse I don't demand you to help me, although that is somewhat hard to see from a forum post. I strive to be humble, hehe=)
Hi,

I know it can be difficult to formulate a question in an area that you are not experienced in. But you can use some of the techniques you learn from your MS experience. Sure linux is by far superior to anything $BG$ has presented. But MS Windows is the core of personal computer usage in the world. I have several MS products but only because of support reasons.

That is why I recommend the reading of relevant material. Sure it may seem terse but to communicate we need to be at least on the same level of transfer of information.

The transfer of information can bewilder most newbies' to the point that they just cannot do the desired action.
I am not talking down to you but to get up too speed with any area of knowledge requires one to read and research.

Yes, the presentation of any request can reflect the mood or character of the person. We must try to remove the emotion from our internet communications! This communication will outlast us all. More than anytime in history of mankind.

I try my best to remember this myself. But I too slip at times.

As users we respond whenever capable to a valid request. If the poster presents a question in an intelligent manner with adequate support information, he/she will generally get more response.

I hope this helps you!

BTW, do checkout some of the references in my sig. Some real goodies' there!

HTH!
 
  


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
Start Up script for wireless running with Ndiswrapper mckinlsm Linux - Wireless Networking 3 10-21-2008 12:11 AM
Problem loading ndiswrapper module on start up. c_mcgeecc Linux - Wireless Networking 6 09-01-2005 01:43 PM
Start wlan0 at boot-up (ndiswrapper) electronique Arch 3 03-03-2005 03:22 PM
automaticly run ndiswrapper at start-up drethenerd Linux - Wireless Networking 6 08-15-2004 05:55 PM
How to start modprobe ndiswrapper automatically ? timbaloo Linux - Wireless Networking 3 06-28-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:08 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