I me and Linux

Friday, May 26, 2006

Getting RealTek 8139D network card working in linux

If you have bought the RealTek 8139D Ethernet card and found that it doesnt work under linux, then well dont worry. All is not lost. There is a software called "ndiswrapper" to rescue your card.
It is a project to get the wireless cards runing under linux. These cards generally dont come with drivers for linux. So what this project does is it uses the windows driver itself to make the device work.
In their own words
"This project implements Windows kernel API and NDIS (Network Driver Interface Specification) API within Linux kernel. A Windows driver for wireless network card is then linked to this implementation so that the driver runs natively, as though it is in Windows, without binary emulation.
With ndiswrapper, virtually every miniPCI (builtin), PCI, PCMCIA (Cardbus only) or USB wireless network card works in Linux. Although ndiswrapper is intended for wireless network cards, other devices are known to work: e.g., USB to serial port device, ethernet card, home phone network device etc. See Wiki entry List for devices known to work."
So you can use your network card in linux aswell.Only difference is that it is now "wlan0" instead of "eth0".

How to get it to work.

If your distribution provides the ndiswrapper package the go to configuration step directly.

If your distribution doesnt provide it then,

First download the stable ndiswrapper software. To get it go to their site and follow the links there to get to the download page. Always use the stable version.

http://ndiswrapper.sourceforge.net

once you have downloaded the package, extract it somewhere.

tar -zxvf ndiswrapper-.tar.gz

cd into the extracted directory and

cd ndiswrapper-

issue the following commands as normal user

make clean
make

now become root user using su and do the following
su
make install

Configuring the ndiswrapper

Once it is installed we proceed to configure the ndiswrapper to get the card working
You need the card's driver for windows, preferably windowsxp's drivers. Copy it to some location where you can access it.
suppose they are in current directory do the following
first cd into the drivers directory and then give the following command

ndiswrapper -i netslnt.inf

next load the ndiswrapper kernel module

/sbin/depmod (not required but, just in case)
/sbin/modprobe ndiswrapper

to load the module next time automatically do this

ndiswrapper -m

this adds the line

alias wlan0 ndiswrapper

to your /etc/modprobe.conf

now to check if your network is working run the folowing commands as root user

ifconfig wlan0 ipaddress
route add default gateway gateway-address

This is only temporary solution to access the internet.
Once the card is working you can follow your distributions way of configuring network. Only mind that now your card is wlan0 and not eth0.

I hope this helped.
Good luck.

Wednesday, May 10, 2006

How I discovered Linux

It was year 2002, I needed to learn Unix basics as it was part of my syllabus for the semester. At that time I did'nt know anything about operating systems other than Microsoft Windows. I only knew vaguely about Macintosh and Unix. I had never seen those operating systems in action.
So I turned to Google inorder to find some information about these other operating systems. I entered the keyword "Unix operating system" and I was surprised at the results. A lot of stuff came up, like BSD, SCO, FreeBSD, Solaris, etc.,. I came to know that all of them are Unix or Unix like operating systems . Most of them were downloadable fro free aswell. It was something new to me since, I did not know until then that whole operating systems are available absolutely free of charge and we can even make copies and distrubute them. But, sadly downloading was not an option for me since I had only dialup connection at that time.
Then I noticed a link for "RedHat Linux 8" and clicked on it. It took me to RedHat's homepage. They had a small flash demo of the operating system they called "RedHat Linux 8". So I clicked on it. It was awesome, a treat to watch. I have never seen any desktop like that in before. The look of the OS was very cool. I said to myself, I have to get this somehow. But how ? I did not know anybody who could help. I went back to google which pointed me to linux.org. This site provided a lot of basic info about gnuLinux and how to get it.
It also advertised a book called RedHat Linux 8 Bible ,which also contained the operating system cds. I decided to buy the book.
The book was my first step towards an entirely new world in software. The world of free software (free as in freedom) . It generated a lot of interest in me regarding free software movement.
I read some articals about RHL 8 on some sites which i dont remember now. They were not really encouraging. But I decided to take the plunge anyway.
It was time to install and I had no clue on how to do it. The book haddetailed instructions in it but I didnt really know anything about installing two operating systems on the same machine. Anyway I popped in the cd and booted from it. First few screens were no problem. I just had to press next, next and next since, the defaults were good enough. Then came the partitioning part. I had a 40GB harddisk but, the book only explained the process for 20GB harddisks. And I didnt even understood the way linux presented the partition information. hda, hda1, hda5 and so on. So I did the unthinkable, I selected the automatic option and went ahead. I got through the remaining screens and finished the installation. It was time to reboot.
After rebooting I have realised what I have done. There was no sign of the other os I had. It simply booted in to RedHat linux. I realised the mistake of not getting enough information. Ofcourse it wasnt too bad since I backed up important files.
Everything was working fine except for mp3's and my internal modem. The book talked about mp3 and some other stuff which were taken out of RedHat 8 due to licensing issues. But there was no help on the modem I had. Since internal modems are cheap they were common. But they only come with drivers for the other operating system. It was then that i realised the true value of the internet and ofcourse google. It searched and searched until I got everything working. In the process I realised that there are user groups for linux (and just about anything for that matter) and joined the local user group. In the mean time I cracked the partitions lingo in linux and installed both the operating systems. I needed the other os simply out of necessity rather than choice. As time went by my knowledge about linux and computers as a whole improved greatly. I started talking about it with some friends and helped them install it on their systems aswell. Suddenly I became the linux guru in my college. There were people comming to ask me doubts about computers, programming etc. I became well known in the college. Although some never realised full benefit or value of free software there were some who were impressed by its realiablity. Especally since there were no blue screens on death. Absence of good support for multimedia was dissappointing for a lot of them as it is such an intricate part of a desktop system.
After few months I borrowed cds of both RedHat 9 and Mandrake 9.1 from a guy I came to know through user group. Mandrake was very good for a desktop system. But I loved Redhat. I never got off the infatuation with Redhat and I still use it to date, ofcourse its Fedora now (but,they are thing anyway. Aren't they? ).

So thats how I started off with linux. Linux has come a long way from were it was when I started.
Installations became much easier and there is good support for multimedia now in some distros.

" If only people could realise what freedom really means there could be more using linux."

Well that all for now, in the future I will post some useful tips on using linux. Until then good bye.