Solved

Installing D-Link PCI adapter on RH9

Posted on 2004-09-14
24
349 Views
Last Modified: 2010-03-18
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.
0
Comment
Question by:klukac
  • 13
  • 11
24 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 

Author Comment

by:klukac
Comment Utility
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.  

0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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 http://www.scyld.com/rtl8139.html).
0
 

Author Comment

by:klukac
Comment Utility
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.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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'.
0
 

Author Comment

by:klukac
Comment Utility
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 :)
0
 

Author Comment

by:klukac
Comment Utility
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?
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
> 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.
0
 

Author Comment

by:klukac
Comment Utility
It can't find the module.  I poked around and found what appear to be NIC drivers under /lib/modules/
0
 

Author Comment

by:klukac
Comment Utility
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.  
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 

Author Comment

by:klukac
Comment Utility
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? :(
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 

Author Comment

by:klukac
Comment Utility
The output to uname -r is:
 2.4.20-8
and to find etc is:
/lib/modules/2.4.20-8/kernel/drivers/net/8139cp.o
/lib/modules/2.4.20-8/kernel/drivers/net/8139too.o
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.  
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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'?
0
 

Author Comment

by:klukac
Comment Utility
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.
>dmseg
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 ;/
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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?
0
 

Author Comment

by:klukac
Comment Utility
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
ide-cd
cdrom
parport_lc
lp
parport
autofs
ipt_REJECT
iptable_filter
ip_tables
keybdev
mousedev
hid
input
usb-uhci
usbcore
ext3
jbd

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.
 
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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?

0
 

Author Comment

by:klukac
Comment Utility
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

 
0
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
Comment Utility
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.
0
 

Author Comment

by:klukac
Comment Utility
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...
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Those are fine.
0
 

Author Comment

by:klukac
Comment Utility
Finally got 3C905 cards, and my Linux box is  connected - thanks!  
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now