Installing D-Link PCI adapter on RH9

I have purchased a DFE 530+ TX card which I have installed on a RH-9 self-built system with non-state-of-the-art components (only 256 MB of memory, for ex).  The card was recognized on boot and I was prompted to input an IP address (as opposed to migrating  the configuration from an older 3Com card that failed).  The IP I provided is not reflected in /etc/sysconfig/network-scripts/ifcfg-eth0, but no matter, the Readme file for the card says that I need to compile the driver and insert is as a module before binding the card to an IP.  I should note that the installation instructions are for RH-6 which may be obsolete for this install!

Anyway I compiled using the instructions at the end of the rtl8139.c file per the Readme instructions.  The errors were first, that I should compile using the correct options (the -06 was not recognized, presumably because that refers to RH6) and then there were parse errors and finally "dereferencing pointer to incomplete type."  I tried using the Makefile, which was not addressed in the readme file, but none of its instructions were recognized.  I tried to insert the driver as a module using insmod, but the rtl8139.o file that was supposed to be generated by the compilation does not exist/wasn't generated.  
I checked the errors again and tried to recompile, first trying to clean up what I had done with a "make clean." However the response to the make clean attempt was "rm -f core *.o, *.a, *.s and *.1st" so I'm thinking that I was supposed to remove files I wasn't prepared to look for.  When I recompiled using -O instead of -06 I got rid of the options error, but I also saw that it was an "error to build against a currently running kernel."  
The compilation instructions in the rtl8139.c file were:
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -06 -c rtl8139.c `[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`  
When I attempted to recompile, I changed the path to  [ -I /usr/src/linux/include/modversions.h ] in response to an error I saw.  I didn't see that error again, but there were lots more parsing and dereferencing errors as mentioned above.

It seems like you need a PHd to install a LAN card on Linux, or at minimum some serious tutorials.  I was initially planning on buying a 3Com card at CompUSA but the price differential was so big ($80 as opposed to $20) that I opted for the cheaper card.  Pls let me know the next step, thanks.
Who is Participating?
jlevieConnect With a Mentor Commented:
My first choice would be a 3C905 or Intel EtherExpress Pro. Second choice woult be a Netgear FA310 or FA311.

> I tried the DFE-530TX on my 4-year old win2k

I presume you mean a DFE-530+. That's not the same card as the 530, which actually should work, even on the older boxes. The 530+ might only work on current hardware, which appears to be the case.
RH 9 includes the driver that you need, so building one isn't necessary.

The first thing I'd do is to boot the system without the card in and let kudzu detect the lack of any NIC's and remove them. Then, if you have the option set the system BIOS to disable PnP mode. Insert the card and kudzu should detect it and ask for config info.
klukacAuthor Commented:
Thanks, I checked, PnP is disabled in the BIOS, and Kudzu once again prompted me to provide the parameters for the card, but again,  ifcfg-eth0 doesn't show up in /etc/sysconfig/network-scripts.  I thought that file was supposed to be generated automatically.  I checked the devices folder and there was an eth0 file there, but I think it's only there because I forgot to delete ibefore rebooting.  Once the card is detected, the /etc/sysconfig folder is supposed to have eth0 files with the hardware address that corresponds.  I'm trying to figure out if my problem is with hardware or with some config error in my RH9 OS.  

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Did kudzu add a line for the driver to /etc/modules.conf? Does lsmod show the driver as being loaded?

I did see a reference or two relating to that card that seemed to indicate that the card itself can have a PnP mode (like the old 3c509's) that needs to be disabled. Apparently that can be done with the rtl8139-diag (see
klukacAuthor Commented:
modules.conf looks ok. there's an alias there for rtl8139, probably the one I had added in on a previous attempt, but I also see an irq setting for the card which I definitely did not add in, so I see that as a good sign.
when I run lsmod, I see nothing there for the rtl8139, nic or anything which appears related, which may explain why there's no light on the card or hub connection.  
I downloaded the diagnostic program from your link and uncovered another problem.  On the linux floppy drive, I can see files I've copied from the linux hard drive, but none of the files copied from my windows pc, which has the internet connection.  Similarly, I see no linux files on the floppy when I insert it into a windows pc.  I've checked the properties for the cdrom and floppy drives on linux, they are the same.  I have no problem seeing windows files on a cd on linux, so I'm stumped.  
If I can't fix this, I can burn the program to a cd and try reading the file off a cd, but this shouldn't be necessary!  if there's any reason this is happening that you can think of, pls let me know thanks.
The fact that kudzu modified modules.conf is good as it shows that kudzu could detect the card. However, the fact that you don't see the module in the lsmod output isn't good and probably indicates that the driver won't load and run.  What happens if you try 'modprobe rtl8139'?

The floppy problem is wierd. What does the line in /etc/fstab for the floppy look like? It should look very much like:

/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0

If the floppy is being mounted as aVFAT file system the data should be accessible to both Linux and Windows. This will normally be the case, especially if you format a floppy on windows, place it in the drive and execute 'mount /mnt/floppy'.
klukacAuthor Commented:
Thanis for this, have been poking around to find out what problems there are.  On modprobe, it can't find the module (so same result with insmod).
On the floppy problem, I tried dmesg |grep floppy and found tons of  I/O errors listed by sector:
end_request: I/O error, dev 02:00 (floppy), sector xx
The results were similar for both of the floppies I am using on Windows PCs.
I have other hardware problems, if you feel like reading on, but I don't think these relate to the floppy problem.
My DVD player isn't recognized at all, I think it's looking for a regular CD player (there's one of those too, and it sees that one just fine).  This was a problem when I installed RH9 with this (4 year-old, anyway, older) Intel motherboard, because it didn't recognize the DVD's I was using to install RH9 on the hard drive.  So I used another system for that and then moved the hard drive back to this case.  Finally, I had tried to upgrade the memory on this thing but I can only use older RAM.  I had some boards at home but haven't ordered any, because several of the older boards I have didn't work, and I wasn't sure what to order.  I have more time than money right now, as you can see :)
klukacAuthor Commented:
I forgot to mention that the /etc/fstab entry for the floppy is correct.  I disconnected the DVD player to improve performance.  After reboot there were no initial dmesg errors on the floppy, and I coud mount/umount however there were no results on ls. Now I'm back to the I/O errors on mount.  Also, dmesg reads Directory spread (sector 0x18) failed - attempt to access beyond end of device.  0200: rw=0, want=12 limit=4
The 02:00 refers to the floppy, per the I/O error I reported previously.  What does this mean?  Do I need to recompile the kernel?  If so, how do I go about this in a way which will correct the problem?
> On modprobe, it can't find the module

Are you saying that modprobe can't find the module, or that it can't be loaded? Those are two completely different errors.
klukacAuthor Commented:
It can't find the module.  I poked around and found what appear to be NIC drivers under /lib/modules/
klukacAuthor Commented:
2d try, don't have a great connection...
It can't find the module, and everything indicates that it just isn't there.  I poked around and found what appear to be NIC drivers under /lib/modules/2.4.20-8/kernel/drivers/net/pcmcia, but no sign of rtl8139...I believe that I recognize 3c589_cs.o, but I don't recognize most of the other drivers.  I tried to modprobe a few hardware addresses from the diagnostic file I downloaded from a link you provided earlier, these were also not found.  
Hmm, The drivers should be in /lib/modules/kernel/drivers/net and I think you should see some files like 8139something.o. And maybe that's where the problem lies if you are looking for rtl8139.o.

At this point what I'd do is to remove the eth0 alias from modules.conf. Then remove the NIC from the box and boot letting kudzu "remove the card". Then re-install the NIC and allow kudzu to configure it. Then check and see what's in modules.conf and whether the driver loads.
klukacAuthor Commented:
Ok, cleaned up modules.conf and rebooted without the NIC and then with it, working with kudzu to configure the card.  What shows up in modules.conf is an alias for rtl8139too on eth0, but again modprobe can't locate the module.  I'd read somewhere that there were problems with the rtl8139too driver.  What next? :(
What does 'uname -r' show?
And what does 'find /lib/modules -name "*8139*"' show?

Right now I don't understand why you are seeing "alias eth0 rtl8139too" in modules.conf when the driver should be 8139too.o. The only thing that makes sense to me at this point is that the rtl8139too is showing up only because you tried to install the driver from source. If we can clean that up things might go back to normal.
klukacAuthor Commented:
The output to uname -r is:
and to find etc is:
I remember seeing an insmod error on boot earlier but when I tried to see it today, the boot process was moving too quickly at the point where I expect to see it to confirm if the error is still there.  
I'd be happy to clean up anything there is to clean, but I'll need instructions ;/
It looks like my original attempt to follow the card installation instructions (compile the driver, then insmod  rtl8139.o) produced a copy of the 8139 driver in the above library path which doesn't work and prevents kudzu from doing a proper install.  It would be great if removing 8139cp.o and starting over would solve the problem, but given the mistakes I've already made I'll wait for word from you before doing anything.  
On an "untouched" RH 9 box I see:

quokka> ls -l /lib/modules/2.4.20-8/kernel/drivers/net/*8139*
-rw-r--r--    1 root     root        22704 Mar 13  2003 /lib/modules/2.4.20-8/kernel/drivers/net/8139cp.o
-rw-r--r--    1 root     root        25240 Mar 13  2003 /lib/modules/2.4.20-8/kernel/drivers/net/8139too.o

Do you get the same results w/respect to file sizes & dates?

Simply compiling rtl8139.c and doing an insmod on the result shouldn't have changed the contents of the modules directory.

What happens if you execute 'modprobe 8139too'?
klukacAuthor Commented:
yes, got the same results on the network driver library
on modprobe 8139too, there was no response
tried modprobe 8139cp, I got:
>/lib/modules/2.4.20-8/kernel/drivers/net/8139cp.o: init_module: no such device
with a prompt to check dmseg or syslog output, followed by  /lib/modules/2.4.20-8/kernel/drivers/net/8139cp.o:
insmod /lib/modules/2.4.20-8/kernel/drivers/net/8139cp.o failed
and insmod 8139cp failed
I checked dmseg and /var/log/messages output, and think I have an IRQ problem.
I copy what look like the relevant parts here.
PCI: found IRQ 10 for device 00:07.2
PCI: Sharing IRQ 10 with 00.0d.0
usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 10
8139too Fast Ethernet driver 0.9.26
PCI: Found IRQ 11 for device 00.09.0
divert: allocating divert_blk for eth0
eth0: D-Link DFE-538TX (Realtek RTL8139) at 0xd08b6000, 00:0d:88:3d:bb:97, IRQ 11
eth0: Identified 8139 chip type 'RTL-8139C'
eth0: Setting half-duplex based on auto-negotiated partner ability 0000
8139cp: 10/100 PCI Ethernet driver v0.3.0 (Sep 29, 2002)

>cat /var/log/messages |grep PCI
kernel: PCI: Probing PCI hardware
kernel: PCI: Using IRQ router VIA [1106/0596] at 00:07.0
kernel: PCI: Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled
kernel: PCI: Found IRQ 10 for device 00:07.2
kernel: PCI: Sharing IRQ 10 with 00:0d.0
kernel: PCI: Found IRQ 11 for device 00:09.0
kernel: 8139cp: 10/100 PCI Ethernet driver v0.3.0 (Sep 29, 2002)

Still hoping this is solvable without major acquisitions ;/
The 2.4 kernel that RH 9 uses is capable of IRQ sharing, providing that the chipset on the motherboard is working according to spec. In particular IRQ routing for PCI devices must work properly.

Sometimes these sort of problems can be cured by updating the system BIOS to the vendor's current version. And, if you have the option, disabling PnP mode in the BIOS can help. In extreme cases only a change of the motherboard or the NIC succeed.

According to the dmesg output the device is being recognised and the 8139cp driver is loading. What does 'lsmod' show?
klukacAuthor Commented:
at one point it did show something related to eth0, I think I saw 8139too, but there's nothing there now since modules.conf was cleaned up.  I'll list the modules and if you need more info let me know
The format line on lsmod output is the usual I'm sure:
Module          Size      Used by       Not Tainted

I checked the BIOS, PnP is disabled.  If I can ever get eth0 up, I'd be happy to do a BIOS update.  I don't know how to do that, so if I get lucky I can graduate to that question.  And then to the floppy error I get on boot:
Updating: /etc/fstab cannot stat /dev/fd0 - not a directory
I can mount the floppy after log-in and it shows up on my desktop, but the files can't be shared on a Windows-formatted floppy.  
With eth0 working I hope to upgrade the memory, and also fix the problem with
the motherboard not recognizing the DVD player, which is kind of critical since my copy of the OS is on DVD, so I can't make changes to my system configuration until I can read DVDs.  Anyway, lots of problems, but first to the 8139 card.
Yeah, it isn't loading the driver according to lsmod. After doing even more web searches I'm finding evidence of people having problems with the 530+ card, but not the 530. Any chance of getting your hands on a different NIC, even temporarily?

After a boot are there any error messages related to the floppy in dmseg?

klukacAuthor Commented:
I swapped the DE-528 CT from my win2k machine, as I read somewhere that it should be compatible with RedHat.  Kudzu didn't see the card, so not even an eth0 showed up on netstat -i, only lo.  It was weird because on this card, unlike the DFE-530TX, the Activity Light lit up on the back of the card.  Also, when I removed the card, Kudzu saw that a Realtek/RTL 8029 had been removed.  I tried a different ethernet slot/port just to be sure I wasn't seeing things, but I didn't go much further, since I've lost a lot of time already.  I'd rather try this with a card that comes recommended for an Intel 686 m/b with a 633 Mhz processor - your ideas on this are appreciated.

I tried the DFE-530TX on my 4-year old win2k machine with the Micro-Star International m/b and a 1GHz AMD Athlon processor, it could not initialize/start.  Finally I tried the card on my son's new Compaq PC, bought off the shelf as his older one was stolen in our underinsured shipment.  He has an ASUSTek m/b, a 2.1 GHz AMD Athlon processor and other neat or new things like built-in ethernet and graphics ports, no floppy drive, and a single IDE connector for all drives (h/d, cdrom, dvd).  The card worked right away, no "new hardware found" prompt or drivers to install.  Unfortunately, what his machine needs is a wireless card.  Now we'll need to research whether the card p/n we had planned to order to work with the WAP will work on his new PC.  

On RH, I looked for floppy errors in dmesg output and found none.  The output is:
ide-floppy driver 0.99.newide
Floppy drive(s): fd0 is 1.44M

klukacAuthor Commented:
Thanks, I'm familiar with 3Com so I googled the 3C905 first, I think those were the cards we used on our NT4 systems a few years ago.  eBay, pricegrabber and others offer 10/100 3C905B-TX card(s) for really low prices.  Thought I'd do one last check with you before committing to this even tho all looks ok...
Those are fine.
klukacAuthor Commented:
Finally got 3C905 cards, and my Linux box is  connected - thanks!  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.