Wednesday, September 16, 2009

Linux: Installing Windows Vista/7 Wireless Driver for use with ndiswrapper

I booted Linux on my Toshiba Mini NB205 netbook. My Linux system is installed on a USB memory stick and I boot it by plugging it in and using GRUB to load the Linux kernel and a custom initrd image. My Linux system doesn't have network connection yet because it doesn't have the driver for Atheros AR9285 wireless LAN adapter. It can't start X Windows either because I haven't installed the X.org driver package for Intel chipsets yet. Once I set up my wireless connection, I'll update my system, install the Intel video driver, and then set up X Windows.



I tried to install the Windows driver for my Atheros Wireless LAN card which will be loaded by ndiswrapper. First, I had to mount the NTFS partition which is hosting my Windows 7 system.


fdisk -l /dev/sda
mount -t ntfs-3g /dev/sda1 /mnt

I changed my working directory to DriverStore/FileRepository.


cd /mnt/Windows/System32/DriverStore/FileReposity

I tried to find the Vendor ID and Device ID of my wireless LAN card by reading the output of lspci -nn.


lspci -nn

The command above gave me the following output.


03:00.0 Network Controller [0280]: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) [168c:002b]

In order to make it easy to find the driver for my wireless LAN card, I created a script file /usr/local/bin/findmydrv.sh with the following contents:


#!/bin/sh
FILETYPE=`file $1`
case "$FILETYPE" in
*UTF-16*)
iconv -f utf16 -t utf8 $1 | \
grep -i $2 | \
grep -iq $3 && \
echo "Found the driver for your device $2:$3 in $1"
;;
*)
grep -i $2 $1 | \
grep -iq $3 && \
echo "Found the driver for your device $2:$3 in $1"
;;
esac

Then, I used the following command.


find -type f -iname \*.inf -exec findmydrv.sh \{\} 168c 002b \;

The previous command will show the location of the .INF file that contains the driver setup information. Once I found the folder that contains the Atheros driver, I went there and installed the driver.


cd netathr.inf_x86_neutral_*
ls -l
ndiswrapper -i netathr.inf

I checked whether the driver was successfully installed by running:


ndiswrapper -l

This displayed the following.


netathr : driver installed
device (168C:002B) present

I tried the newly installed Windows driver.


modprobe ndiswrapper


Related Posts


1 comment:

  1. Did the device actually work with ndiswrapper and the Windows 7 driver you installed? I've never been able to get any of the Atheros 9xxx chips working with ndiswrapper--"ndiswrapper -l" reports "device present," etc., but when you modprobe ndiswrapper, no wireless interface is created, and dmesg will mention a bunch of errors related to ndiswrapper.

    ReplyDelete

About This Blog

KBlog logo This blog seeks to provide a collection of interesting pictures found on the Web. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

Powered By Blogger