LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 04-13-2006, 01:26 AM   #16
mtritu
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
It works for me


By adding a whatever.modules in the /etc/sysconfig/modules/ then the ndiswrapper module is loaded at startup.

#!/bin/sh

echo "Loading WLAN module..."
modprobe ndiswrapper

It's Linux, so as long as it's work. I'm OK with it. It's great to find out your post.

Last edited by mtritu; 04-13-2006 at 01:27 AM.
 
Old 03-05-2007, 02:27 AM   #17
slowcivic2k
LQ Newbie
 
Registered: Nov 2006
Location: Minnesota
Distribution: Fedora Core 8 i686
Posts: 9

Rep: Reputation: 0
After putting modprobe ndiswrapper in my /etc/rc.d/rc/local file, my wireless card is active at boot. However, after typing the iwconfig command as su or and other user, the kernel spits out about 10 or so messages, and crashes completely. First, the keyboard stops, then the mouse, then the x server crashes. I havent found any errors in the system log or dmesg. In bash it just spits out messages, and few hex values, and crashes and burns. After I removed that command, everything went normal. I guess FC6 doesn't like that command in there very much.

happened on kernel 2.6.19-1.2911.6.4.fc6
ndiswrapper 1.25 installed from yumex
rt2500 linksys wireless g card

Anyone had better luck activating their card at boot? /etc/modules.conf didn't work, either.
 
Old 03-05-2007, 06:17 AM   #18
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Choose one:

1. As root create a file named something like my.modules in /etc/sysconfig/modules which has the line; /sbin/modprobe ndiswrapper

2. As root crate a line entry in /etc/modprobe.conf which looks like:

alias wlan0 ndiswrapper

For either:
make sure you have a /etc/sysconfig/network-scripts/ifcfg-wlan0 file that looks something like;

TYPE=Wireless
DEVICE=wlan0
HWADDR=
BOOTPROTO=dhcp
GATEWAY=routers IP address here
DOMAIN=
ONBOOT=yes
ONHOTPLUG=no
USERCTL=yes
IPV6INIT=no
PEERDNS=no
ESSID=MyRouterNameHere
CHANNEL=1
MODE=Auto
RATE=Auto
 
Old 03-06-2007, 12:06 AM   #19
slowcivic2k
LQ Newbie
 
Registered: Nov 2006
Location: Minnesota
Distribution: Fedora Core 8 i686
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by Lenard
Choose one:

1. As root create a file named something like my.modules in /etc/sysconfig/modules which has the line; /sbin/modprobe ndiswrapper

2. As root crate a line entry in /etc/modprobe.conf which looks like:

alias wlan0 ndiswrapper

For either:
make sure you have a /etc/sysconfig/network-scripts/ifcfg-wlan0 file that looks something like;

TYPE=Wireless
DEVICE=wlan0
HWADDR=
BOOTPROTO=dhcp
GATEWAY=routers IP address here
DOMAIN=
ONBOOT=yes
ONHOTPLUG=no
USERCTL=yes
IPV6INIT=no
PEERDNS=no
ESSID=MyRouterNameHere
CHANNEL=1
MODE=Auto
RATE=Auto
The first option you stated works perfectly, thanks a ton.
 
Old 03-06-2007, 07:50 AM   #20
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Your welcome.
 
Old 04-15-2007, 11:07 AM   #21
nimkgb
LQ Newbie
 
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
Thanks Lenard, your first method works perfectly!
 
Old 05-09-2007, 05:10 PM   #22
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,301

Rep: Reputation: 197Reputation: 197
Oops. my bad. right answer; wrong thread.

Last edited by bigrigdriver; 05-09-2007 at 05:12 PM.
 
Old 08-04-2007, 05:46 PM   #23
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,285
Blog Entries: 1

Rep: Reputation: 102Reputation: 102
Init script for Red Hat distros

I created an init script for Fedora Core 4 that should work on all Red Hat distros. It loads the ndiswrapper driver, initializes the wlan interface, and starts wpa_supplicant. You will need to put the script in

/etc/rc.d/init.d

and run

# chkconfig --add wlan
# chkconfig --level 345 wlan on

to get it to start at boot. It will start right after network is started and will stop right before network is stopped. You can control the wlan script using the usual Red Hat syntax:

# service wlan start
# service wlan stop
# service wlan restart

You may need to massage the script to handle any idiosyncrasies of your setup (e.g. change wlan0 to wlan1). E-mail me if you have an questions.

#!/bin/bash
#
# wlan This shell script takes care of starting and stopping
# the wlan interface.
#
# Copyright: (C) 2007 David Cullen dcullen@kerneldriver.org
#
# License: GPLv3
#
# chkconfig: - 11 89
# description: wlan starts the wlan interface.

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0
INTERFACE="wlan0"
LOGFILE="/var/log/${INTERFACE}.log"

wlanup()
{
echo "Loading ndiswrapper..." > ${LOGFILE}
if ! modprobe ndiswrapper >> ${LOGFILE} 2>&1 ; then
echo "Could not load ndiswrapper" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
echo "Configuring ${INTERFACE}..." >> ${LOGFILE}
if ! ifconfig ${INTERFACE} 192.168.1.251 netmask 255.255.255.0 broadcast 192.168.1.255 >> ${LOGFILE} 2>&1 ; then
echo "Could not configure ${INTERFACE}" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
echo "Bringing up ${INTERFACE}..." >> ${LOGFILE}
if ! ifconfig wlan0 up >> ${LOGFILE} 2>&1 ; then
echo "Could not bring up ${INTERFACE}" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
echo "Sleeping for one second..." >> ${LOGFILE}
if ! sleep 1 >> ${LOGFILE} 2>&1 ; then
echo "Could not sleep" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
echo "Configuring WPA..." >> ${LOGFILE}
if ! /usr/local/sbin/wpa_supplicant -Dwext -i${INTERFACE} -c/etc/wpa_supplicant.conf -B 2>&1 >> ${LOGFILE} ; then
echo "Could not configure WPA" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
echo "Configuring default route..." >> ${LOGFILE}
if ! route add -net default gw 192.168.1.254 dev ${INTERFACE} >> ${LOGFILE} 2>&1 ; then
echo "Could not configure default route" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
return $RETVAL
}

wlandown()
{
echo "Stopping WPA..." >> ${LOGFILE}
if ! killproc wpa_supplicant >> ${LOGFILE} 2>&1 ; then
echo "Could not stop WPA" >> ${LOGFILE}
return 1;
fi
echo "Bringing down ${INTERFACE}..." >> ${LOGFILE}
if ! ifconfig ${INTERFACE} down >> ${LOGFILE} 2>&1 ; then
echo "Could not bring down ${INTERFACE}" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
echo "Unloading ndiswrapper..." >> ${LOGFILE}
if ! rmmod ndiswrapper >> ${LOGFILE} 2>&1 ; then
echo "Could not unload ndiswrapper" >> ${LOGFILE}
return 1;
fi
echo "Done." >> ${LOGFILE}
return $RETVAL
}

start()
{
echo -n $"Bringing up ${INTERFACE}: "
wlanup
RETVAL=$?
[ $RETVAL -eq 0 ] && echo_success || echo_failure
echo
return $RETVAL
}

stop()
{
echo -n $"Bringing down ${INTERFACE}: "
wlandown
RETVAL=$?
[ $RETVAL -eq 0 ] && echo_success || echo_failure
echo
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|reload}"
exit 1
esac

exit $RETVAL

Last edited by David1357; 12-01-2007 at 04:06 PM. Reason: Updated e-mail address
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get ndiswrapper to load at boot time master Linux - Wireless Networking 3 02-25-2006 05:33 PM
ndiswrapper wouldn't load on boot sguen Slackware 5 07-28-2005 03:46 PM
load modules at boot coldsalmon Linux - Newbie 4 04-21-2005 05:36 PM
Load modules at boot martincho Linux - Networking 2 11-27-2004 11:12 AM
Modules don't seem to load on boot ViNsAniTy Linux - Newbie 4 04-21-2004 01:40 PM


All times are GMT -5. The time now is 06:48 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration