# NIC won't work

## Green Letters

Ok, im rather new to linux i started out with redhat and mandrake, but i was told that if I could get Gentoo to work i would like it alot better.  I have the os installed and it boots and i can login to root.  My problem is i can't emerge kde or any other gui.  I have been told its because my NIC is not being recognized by the kernel or thats what i think is wrong.  When i login and try ifconfig it never shows eth0.  I run a D-Link DFE-530TX+ in my linux box.  I have tried numorous things that a friend told me to try.  He told me to try modprobe tulip and it let me emerge rsync it won't let me emerge kde.  If anyone could help me get this NIC working and get eth0 to load i would greatly appreciate some help with it.

thanks

----------

## delta407

 *Green Letters wrote:*   

> I run a D-Link DFE-530TX+ in my linux box.

 

That's one of my favorite network cards.  :Very Happy: 

Anyway, IIRC it uses the Realtek RTL8139 chipset, so just reconfigure your kernel with RTL8139 support built in (it's more convenient than modules) and you should be all set.

----------

## delta407

Oh yeah, moving to Networking forum.

----------

## Green Letters

thanks, is there a way to do that without redoing my whole system.  Im a linux newbie and i just don't know if i need to start over and enable the realtek or if i can do it right now logged in as root.

----------

## delta407

To use a new kernel, do this:

```
# cd /usr/src/linux

# make menuconfig

... change settings...

# make dep && make clean bzImage modules modules_install

# mount /boot

# cp arch/i386/boot/bzImage /boot/bzImage (or whatever you named your kernel)

# umount /boot
```

Then, reboot to load your new kernel and you ought to be set.

----------

## Green Letters

ok it booted without errors this time.  But now my problem is its not booting eth0, i think that i might of removed it from some file that its supposed to be in, im not sure what all i've edited, just a friend had me edited a bunch of files

----------

## Green Letters

ok now when it boots i get an error that it can't load tulip...any help??

----------

## rac

It shouldn't want tulip any more, assuming the Gentoo Forums' resident AI aka delta407 is operating correctly.  Might you have a stale reference to tulip in /etc/modules.autoload as a result of your earlier efforts?  If that is not the case, please post a more detailed error message.

----------

## Green Letters

ok i did what delta said, i added the realtek support.  I reboot my machine and when its finished and wants me to login it has an error that says "Failed to load tulip"

----------

## delta407

You probably still have tulip enabled in /etc/modules.autoload. Remove it and everything should be happy.

----------

## Green Letters

ok well i took it out.  It boots fine without any errors except when i do ifconfig i get no eth0........and i can't emerge any guis or anything because of it.

----------

## delta407

Did you build rtl8139 as a module <M> or compiled in [*]? If it's <M>, you have to add rtl8139 to modules.autoload.

----------

## Green Letters

ohh ok, that will probably help because yea it is M not *  let me try it

----------

## Green Letters

ok well that didn't work, now its saying "Failed to load rtl8139"

----------

## delta407

Wait, did you compile "RealTek RTL-8139 PCI Fast Ethernet Adapter support" or "RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)"? If you did the first one, you need to add "8139too"; if it's the second one, you need to add "8139cp".

...and remove the earlier one I told you, I wasn't thinking.  :Wink: 

----------

## Green Letters

i chose the non expiremental one..

----------

## Green Letters

ok i took out rtl8139 (/etc/modules.autoload) and added 8139cp, it says failed to load 8139cp...

----------

## delta407

No, see, 8139cp is if you chose the experimental one.  :Wink: 

Anyway, I tend to compile drivers into the kernel [*], since we don't have these problems then. Oh well, this ought to work.

----------

## Green Letters

ok well when im in the kernel configuration how do i make it compile that instead of making it a module.  I hit M on it and it makes it a module.  sorry wasn't paying attention up there   :Wink: 

----------

## Green Letters

ok, its loading that module now but still no eth0....i just don't understand it

----------

## delta407

You don't have to reconfigure, but if you want [*] you can hit Y.

----------

## Green Letters

ok, but what about this eth0 thing, i can't get it to find eth0 and without it i can't emerge any gui...

----------

## delta407

Okay, here's what happens. The kernel needs to have a driver for your network card, and you can do this in two ways. One is to build the driver into the kernel [*], the other is to build it as a module <M> and put the module name into /etc/modules.autoload. Then, /etc/init.d/net.eth0 reads your configuration settings in (/etc/conf.d/net) and tries to bring up eth0, which corresponds to the previously loaded driver.

Thus, you can either hit Y and recompile/reinstall your kernel, or add 8139too to /etc/modules.autoload. Everything should work after doing either.

----------

## delta407

 *Green Letters wrote:*   

> ok, its loading that module now but still no eth0....i just don't understand it

 

Oh, didn't see that post.

Is net.eth0 starting automatically? (rc-update add net.eth0 boot)

Is /etc/conf.d/net set up right? (nano -w /etc/conf.d/net)

----------

## Green Letters

ok this is what i get when i reboot 

```
*Brining eth0 up...

modprobe: modprobe: Can't locate module...

dhcpcd[1699]: dhcpStart: ioctl SIOCGIFHAPPR: No such device.

*Failed to bring eth0 up
```

----------

## delta407

Okay, two things to check. One: is the driver being loaded? (If it's a module, run "lsmod". If it's compiled in, check "uname -a" to the timestamp your kernel was built on to make sure you're running the right kernel.)

Two: is it a TX+? The D-Link 530TX cards use a completely different driver.

----------

## Green Letters

D-Link DFE-530TX+

if i do lsmod

```
#lsmod

Module                  Size       Used by       Not Tainted

8139too                 14272     0 (unused)

mii                          1136     0 [8139too]
```

----------

## delta407

...what does ifconfig say?

----------

## Green Letters

```
#ifconfig

lo          Link encap:Local Loopback

             inet addr:127.0.0.1 Mask:255.0.0.0

             UP LOOPBACK RUNNING MTU:16436 Metric:1

             RX packets:0 errors:0 dropped:0 overruns:0 frame:0

             TX pcakets:0 errors:0 dropped:0 overruns:0 carrier:0

             collisions:0 txqueuelen:0

             RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
```

thats what it says, no eth0

----------

## delta407

Hmm... that's icky. You might want to wade through "dmesg | less", particularily the last little bit, to see if you can find anything applicable.

----------

## Green Letters

i have no idea what im looking for...

----------

## delta407

Anything relating to your network card.

----------

