Sunday, September 03, 2006

FC 5 - Fedora Core wireless network setup with a windows driver

alright, I finally changed my windows to an FC5. And therein lies the problem, my stupid wireless driver is only for windows. Nevermind that, there are solutions right? And yup, I found ndiswrapper. Seriously, bless the fella who created that tool as it must have saved many a wireless network card. Anyway, so I proceeded to install it, but there were lots of tweaking to do. So this is what I have done, hopefully it helps some other poor soul.

1. Login as root, and type this command
# su -
(Frankly speaking, I don't know why I had to do this, but if I didn't, ifconfig and such commands won't work.)

2. Ensure that you have the kernel-devel RPM suitable for your kernel. You can check this by using this command
# cd /usr/src/kernels (If you do not have any, most likely you wouldn't even have the kernels folder.)

Assuming that you do not have it installed..(if you do, skip to...step 8)
3. Check your kernel version
# uname -rm

4. Proceed to look for the correct kernel-devel RPM
Note: The default stack size in the original FC5 kernel is only 4K, but most other external drivers like in my case, the wireless drivers, they require more, so you should update your original kernel as well.
Try this website
(http://www.linuxant.com/drivers/hsf/full/downloads-fc5-kernel-i686.php?PHPSESSID=b1775eea161ff873e65c90702b698052)

5. When you have downloaded the correct RPMS, you can create a folder to hold them and cd into it
# rpm -ivh *.rpm

6. Once installed, you have to edit grub to let it know which kernel to boot up as the original kernel is still there.
# cd /boot/grub/
# vi grub.conf
.....
title Fedora Core (2.6.15-1.2054_FC5.stk16smp)
root (hd0,0)
kernel /vmlinuz-2.6.15-1.2054_FC5.stk16smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5.stk16smp.img
#title Fedora Core (2.6.16-1.2129_FC5)
# root (hd0,0)
# kernel /vmlinuz-2.6.16-1.2129_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

As you can see, I've commented out the original grub configs, so that grub will ignore them and boot the correct kernel.

7. Now reboot your system, once it starts, open your terminal window and repeat step 1. Then type this to check that the correct kernel is loaded:
# uname -rm

8. Get your Windows wireless network card drivers.

9. Install unshield(http://synce.sourceforge.net/synce/unshield.php)
# ./configure
# make
# make install

10. cd to where you downloaded the windows driver and use unshield to extract your cab files from your driver
#mkdir tmp
# unshield -d tmp x data1.cab

11. Ensure that you have no previous installations of ndiswrapper
# make uninstall
# make distclean

12. Download and install the latest ndiswrapper
# make
# make install

13. cd to the tmp folder we created earlier in the windows driver directory and look for an INF file.
# ndiswrapper -i .inf
# ndiswrapper -l (To check if the driver is there)

14. Edit the modprobe.conf file
# vi /etc/modprobe.conf
Add "alias wlan0 ndiswrapper" to the top of the file and make sure there is an extra line at the bottom of the file. Save and close.

15. Load the ndiswrapper.
# modprobe ndiswrapper

16. To check if ndiswrapper has been loaded, do this:
# dmesg

17. Now, to configure your network card. Go to System > Administration > Network

18. Click New and select wireless as your device type.

19. After clicking "Forward", you should see ndiswrapper as one of the wireless card to configure. Select it and the rest of the configurations will depend on your own wireless network.

1 comment:

god_is_good478 said...

wow... nice !