Ndiswrapper on a LiveCD Mini-HowTo
Disclaimer: Because ndiswrapper uses Windows drivers results
may vary. Before this project I had never touched ndiswrapper, there is a
little bit of magic and a good portion of luck involved in getting it to run.
1. Installation
Due to some kernel dependencies I was unable to emerge the ndiswrapper
package (version 1.2 at the time of this writing) from my stage 1 and had to
move it to stage 2. Once there it installed just fine. Also be sure to
add the wireless-tools package to your stage 1.
2. Kernel Options
There are several Windows drivers that are known to work
with ndiswrapper, a list can be found here http://ndiswrapper.sourceforge.net/mediawiki/index.php/List
Several of the cards require minor tweaking of a few kernel
options to work properly. One of the more common changes is disabling the
4k_Stacks option. Other than that things are pretty straight forward.
3. Driver Preparation
Download the Windows Drivers from the manufacturer, if you
are unsure refer to the link above for a list of drivers. If you are unsure of
the revision of the wireless card that you are using (note: chipsets can change
between revisions), then from a shell execute the command lspci –v and
find your card on the list if it is detected. This will verify which chipset
you are using. Place the drivers into a folder, note that you only need to
include the .inf and .sys files.
4. Overlay
Add a directory to your build using the livecd/root_overlay
in stage 2, for example /usr/wireless.
5. Starting wireless
After your fresh new build boots up, move to a command line
then:
lspci –v <<-verify that your card has been
detected
cd /usr/wireless <<-The location of your Windows
drivers
ndiswrapper -i <FILE_NAME> <<-Note this is
the INF file, in previous versions you left off the .inf extension I have only
been able to get it to work by leaving it on
ndiswrapper -l <<-This will list off the loaded
driver
modprobe ndiswrapper <<-Adds your module
iwconfig wlan0 essid <YOUR SSID HERE>
iwconfig wlan0 key <YOUR WEP KEY
HERE> <<- Only if you use WEP encryption
dhcpcd wlan0 <<-If you use DHCP
For a static IP
net-setup wlan0 <<-Follow the prompts for a
wireless configuration
6. Verification
Iwconfig wlan0 <<-This should now show the
information for the associated AP
Ifconfig <<-Should list wlan0 with activity on
the Tx: and Rx:
I hope this helps out, as of today I have only tested it
with a Linksys WMP54Gv4 wireless card running 128-bit WEP, but it runs great
and is very stable with the above configuration.
Paul