LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-27-2004, 07:00 AM   #1
cutejai
LQ Newbie
 
Registered: Aug 2003
Posts: 23

Rep: Reputation: 15
kernel problem. =(


hi all.
i'm having really hard time trying to get my network card to work. =( So please anyone kind enough to give me a helping hand.
this is the problem:
i've installed Debian 3.0r2. and now i'm having trouble getting kde to work. but i don't really care about that. i just need it to detect my network card.
coz i've look through "modconf", but i just couldn't find my card model(it's d-link(dfe528), However i manage to download a linux driver for it.
and now i end up having trouble installing it. coz the driver say, it only support kernel 2.2.x. and when i run
"uname -a" it shows 2.2.20 so i assume that's my current kernel version.
but i just can't get it to work, it say in the driver instruction that. i need to type in

gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c dfe528.c

but it keep having msg like function interrupt and no member name 'start' or something.

so is there any other way that i could make this to work?

thanx alot for any help.

my card model is d-link dfe-528tx

*** when i try "ifconfig" it shows up nothing
it shows up a loop back interface before. but after i modify the /etc/network/interfaces now when type in ifconfig it shows up nothing.
but i'm pretty sure it doesn't detect my NIC. coz i have 2 of them(same model). and none of them is detected.

Hope i didn't make the situation sound too complecated.
 
Old 08-27-2004, 07:52 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Firstly, could you please provide a link to the source file you downloaded, and give the actual error you're recieving.

Secondly, I wouldn't trust that instruction too much. It's using -O6, which is actually a synonym for -O3, so I doubt they've looked into it too deeply. -O2 is more normal for kernel modules. I'd also expect a -D__KERNEL__ (but this might be actually in the source file; also that's from memory so it may not be totally accurate). It's a long shot but you could try compiling with
Code:
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -c dfe528.c
Almost every kernel module has a function called start (or is it _start?) to initialise the module. But without seeing the source, or at least the actual error message, I really can't begin to guess what's going on here.

Also, which version of gcc are you using (as this may possibly make a difference).
Code:
gcc --version
Just to clarify:
Code:
uname -r
will return just the kernel version, which is the same as returned by
Code:
uname -a
which returnes other information as well.
 
Old 08-28-2004, 01:22 AM   #3
cutejai
LQ Newbie
 
Registered: Aug 2003
Posts: 23

Original Poster
Rep: Reputation: 15
hi rjlee
thanx for your input, it gives me hope again when seeing someone like you willing to help. =) this is to respond to all your questions.

Code:
1. this is where i got my driver from 
http://tsd.dlink.com.tw/info.nsf/80d...b?OpenDocument
Code:
2. when i run "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O2 -c dfe528.c" or replace -O2 with -O6. it gave the same error message. 

======================================
In file included from dfe528.c:130:
kern_compat.h:463: warning: static declaration for `pci_find_capability' follows non-static
dfe528.c: In function `rtl8129_open':
dfe528.c:714: structure has no member named `tbusy'
dfe528.c:715: structure has no member named `interrupt'
dfe528.c:716: structure has no member named `start'
dfe528.c: In function `rtl8129_timer':
dfe528.c:806: structure has no member named `interrupt'
dfe528.c:812: structure has no member named `tbusy'
dfe528.c: In function `rtl8129_tx_timeout':
dfe528.c:939: structure has no member named `tbusy'
dfe528.c: In function `rtl8129_start_xmit':
dfe528.c:970: structure has no member named `tbusy'
dfe528.c:993: structure has no member named `tbusy'
dfe528.c:997: structure has no member named `tbusy'
dfe528.c: In function `rtl8129_interrupt':
dfe528.c:1022: structure has no member named `interrupt'
dfe528.c:1025: structure has no member named `interrupt'
dfe528.c:1122: structure has no member named `tbusy'
dfe528.c:1123: `NET_BH' undeclared (first use in this function)
dfe528.c:1123: (Each undeclared identifier is reported only once
dfe528.c:1123: for each function it appears in.)
dfe528.c:1198: structure has no member named `interrupt'
dfe528.c: In function `rtl8129_close':
dfe528.c:1321: structure has no member named `start'
dfe528.c:1322: structure has no member named `tbusy'
dfe528.c: In function `rtl8129_get_stats':
dfe528.c:1387: structure has no member named `start'
======================================
Code:
3. when run "gcc --version" i got "gcc 2.95.4"
Code:
4. when run "uname -r" i got "2.2.20-idepci"
Code:
5. This is the entire instruction i got from that driver. 
=====================================================
Linux driver for kernel 2.2.X

The procedure to activate D-Link DFE-528TX 10/100 Adapter
on linux is as follows:

step 01: Copy the driver source files to a convenient directory.

step 02: Compile
         The instruction for compiling the driver is include at the
         end of the driver file.If a compile-command is not there use
         the following compile command:
         (Run this instruction at /usr/src/linux)

         *compile-command:
         " gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c dfe528.c "

         Or you can use the Makefile included in the driver disk \LINUX.

 step 03: Copy the module "dfe528.o" to
          "/lib/modules/{kernel-version}/net"

          *The directory "{kernel-version}" stands for the Linux kernel
           version you use.

 step 04: Insert the driver as module:
          insmod dfe528.o
          (Run 'lsmod' to see if the module is inserted)

 step 05: Bind your card to an IP address

          /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST}
          netmask ${NETMASK}
          (Run 'netstat -i' to see if there is a interface 'eth0')

 step 06: Add your card to IP routing table, then add gateway also
          your card:
          /sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
          (Should be able to ping local network now)

          gateway:
          /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1

 step 07: Start inet daemon.
          /usr/sbin/inetd
          (You are on the network now)

 *make sure that your kernel is built with network, fast_ethernet and
  module support. Otherwise, you have to rebuild your kernel.
  ( 01:Go to /usr/src/linux directory
    02:Run "make menuconfig" or "make config"
    03:Mark the options list above.
    04:Exit and rebuild your kernel.
       make dep;make clean;make zImage
       the file "zImage" will be at
       /usr/src/linux/arch/i386/boot/zImage
    05:Modify /etc/lilo.conf.(this file specify where kernel image is)
    06:Run "lilo" )

 You can run "netconfig" which will do step 05,06,07 for you.

 Then just add a line at the beginning of "/etc/rc.d/init.d/network".

       " insmod /lib/modules/{kernel-version}/net/dfe528.o "

       *The directory "{kernel-version}" stands for the Linux kernel
        version you use.
 then your driver will work every time you boot.
=====================================================
Hope all these info could give you more hints to investigate my problem. =)


Best Regards
 
Old 08-29-2004, 11:23 PM   #4
cutejai
LQ Newbie
 
Registered: Aug 2003
Posts: 23

Original Poster
Rep: Reputation: 15
anyone pls help. or is there any alternative way to get it to work?
any input will be greatly appreciated.
 
Old 08-29-2004, 11:48 PM   #5
andymadigan
Member
 
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59

Rep: Reputation: 15
Another long shot

There are two other possible ways of getting the network card to work

1. Try debian-installer (for Sarge) http://www.debian.org/devel/debian-installer/

2. Try Knoppix http://www.knoppix.net

Knoppix is a live cd, and Knoppix based, if you network card works under knoppix, try finding out what driver it uses for it (or just install Knoppix).

A google for this card turned up almost nothing, which could mean that it's well supported by newer distros or that it's rarely used. Of course, your third option is to get a new network card, the Realtek 8139 is pretty much universally supported.
 
Old 08-30-2004, 12:17 AM   #6
cutejai
LQ Newbie
 
Registered: Aug 2003
Posts: 23

Original Poster
Rep: Reputation: 15
hi andy

thanx heaps of you fast response.
when i load knoppix 3.3. the network card works properly. so how do i find out what driver it uses?

please enlighten.
 
Old 08-30-2004, 02:15 AM   #7
Eux
Member
 
Registered: Apr 2004
Location: Spain
Distribution: Debian (Woody+Sarge)
Posts: 54

Rep: Reputation: 15
Hi,

the hints given by our colleagues may help you to detect and make sure that the NIC can actually WORK besides providing you with the correct module name - so if you can try those options as well!

The problem you specify is a very common one - as a matter os fact I had the same problem a few months ago....


Here is how you solve it:

1st) you must make sure that your bios DOES NOT have the option ( Plug'n'Play OS - enabled ) or something of the like - if this option is enabled the bios WILL take over the command to control the interrupt for the Network Card and that leads to interrupt conflict hence not detecting the Network Card;

2nd) ' d-link dfe-528tx' is the model of the card - which is a complete different thing from the chipset which is what Linuxes use to make the components work - the chipset is a Realtek 8139 so once you compile the kernel look for a module from this chipset ( I can't remember now what is called but should be something like _ 8139too );

I would recommend you compile it first as a MODULE - make sure it works properly and once you are 100% sure - if you want - recompile the kernel but this time, compile it directly into the kernel so it is always loaded.

You should not worry about the driver you have downloaded - do not bother trying to install that one, Debian has the driver starting from the stable version you have 3.02r.

Just make sure you follow these steps and in case you still don't get it working tell us...........



Max
 
Old 08-30-2004, 02:58 AM   #8
cutejai
LQ Newbie
 
Registered: Aug 2003
Posts: 23

Original Poster
Rep: Reputation: 15
thanx tons eux
but i don't quite understand how to perform this step:
Code:
"I would recommend you compile it first as a MODULE - make sure it works properly and once you are 100% sure -
 if you want - recompile the kernel but this time, compile it directly into the kernel so it is always loaded. "


so if you could kindly put that into somekind of understandable step-by-step instruction. that would be greatly appreciated.

coz i'm always a windows freak. and fairly new to linux/debian. so i don't even understand what you mean by "compile it as a module", "recompile the kernel directly into the kernel."

please help.
 
Old 08-30-2004, 03:05 PM   #9
andymadigan
Member
 
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59

Rep: Reputation: 15
knoppix, etc.

It seems odd that the Realtek 8139 isn't working, that's the one component in my system I've never had problems with. In my experience it is compatable with virtually every distro, but of course I don't think I ever tried running kernel 2.2. I have never tried recompiling the kernel, you should try if you feel brave enough. I would try debian-installer, I installed using it just a few weeks ago. Knoppix is a bootable cd (full desktop right at start, useful for partitioning + recovery as well) based on sarge, and installs as normal debian (+ a few knoppix-specific packages). I would try debian-installer first, since Knoppix installs a lot packages you'll probably never use.

In terms of finding out which driver, I think it's built into kernel 2.4 (which is what knoppix uses). I would think that /etc/modules would list kernel modules, but I have only two, very standard modules (ide-cd + ide-detect). I suppose you could try upgrading to kernel 2.4 (using either a debian dist cd or try to setup your own cd on another machine).

Last edited by andymadigan; 08-30-2004 at 03:11 PM.
 
Old 08-31-2004, 04:23 AM   #10
cam2004
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Rep: Reputation: 0
Kernel rebuild

If you're concerned about building modules etc, I would recommend that you just jump in and try to recompile a new kernel - it's really not difficult if you follow something like the tutorial below and (not unlike the Holy Stone of Clonriccart) "you get a great buzz off it"...

This is very easy to follow:

The Very Verbose Guide to Updating and Compiling Your Debian Kernel
http://www.osnews.com/story.php?news_id=2949


Good luck...
 
Old 08-31-2004, 04:48 AM   #11
cutejai
LQ Newbie
 
Registered: Aug 2003
Posts: 23

Original Poster
Rep: Reputation: 15
thanx heaps for all the replies.

i tried installing rlt8139 driver last night. but it didn't let me install. because my card is using other chip set.
and finally i gave up. and decided to swap my 2 d-link with my friend who has 2 really old network card with rlt3189c chip set in it

so i replaced it and reinstall debian.
and guess what? it worked like a champ. no problem, it detected both of them during installation. so ummmmmmmm,,, i guess debian only like rlt3189 chip set. =)

now i'm ready to recompile the kernel from 2.2.20 to 2.4.27 to get the most out of it. stability is the most concern in my case. coz i will be setting up this box as a router and firewall, may be print server as well. so it's gonna be on 24/7

so any comment about that 2.4.27 kernel? or should i just compile the 2.6 instead? just wondering which one is more stable.
and again. thank you so much for all your support. all the input really help me to learn. =)
 
Old 09-02-2004, 03:05 PM   #12
Marc A
Member
 
Registered: Mar 2004
Location: Bxl Europe
Distribution: Debian/Ubuntu
Posts: 84

Rep: Reputation: 15
Hi,

If I read right, you're using Débian. Most Debian users don't compile kernels. Debian make it for us. You've got to see what is in store.
#apt-get update
#apt-cache seach kernel-image
than choose something working for you processor (386, 686 or k7 for amd)
than # apt-get install kernel-image-2.6.XX (XX for the choosen version)

if you're using grub as boot loader it makes the changes to the new kernel (for lilo users add the corect lines in the lilo config and run #lilo).

I hope I'm not forgetting something important.
If you like kernel 2.6 install udev and change your mouse pointer in /etc/X11/XF86Config-4 to /dev/input/mice. also add module mousedev (see google kernel 2.6 mousedev )

Good luck

Mac A

Last edited by Marc A; 09-02-2004 at 03:06 PM.
 
Old 09-02-2004, 04:30 PM   #13
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
I would like to point out that compiling your own kernel has a number of advantages for both the performance and security of your system.

Stock kernels like those produced by Debian tend to provide support for absolutely everything that they can in order to run on as much hardware as possible, which means you will be including at least some code compiled into the kernel that you won't need, and have some other code as modules that you would rarely want to unload. This will work fine, but isn't necessarily efficient, and security holes in one module may affect the entire kernel (unlikely but possible).

The main advantage of a stock kernel is that it's virtually guarenteed to work regardless of your setup.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing module in Fedora Core 2 (2.6 kernel vs 2.4 problem?) Arodef Linux - Kernel 3 11-30-2007 02:55 PM
kernel 2.6.9 Kernel panic problem salahuddin_66 Slackware 2 08-11-2007 03:17 AM
Kernel panic problem with all of my kernels after installing new kernel nosebleed Linux - Software 2 04-14-2006 09:48 PM
Problem booting up new kernel. Kernel panic error... RHLinuxGUY Red Hat 2 04-11-2004 04:59 AM
Linux Kernel Problem -- Kernel panic: CPU context corrupt crcooney Linux - Distributions 0 01-15-2004 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration