# eth0 loading failure

## jkb

I've got Gentoo paritally installed and booting off the hard drive. When it loads it says that eth0 failed to load for some reason, it said that it couldnt find device eth0 or something.

So I cant get the internet for emerge or anything. It was working while still on the CD install part tho.

----------

## thoughtform

what kernel do you have?

what ethernet card?

driver installed as compiled in, or as a module?

----------

## jkb

Kernel: 2.6.4

Ethernet Card: Intergrated Realtek

Drivers: Think it's a module

----------

## thoughtform

type lsmod 

tell me what modules are loaded

----------

## jkb

Right, here is the list:

```

parport_pc

parport

floppy

8139cp

mii

rtc

dm_mirror

dm_mod

ata_piix

ahci

sata_qstor

sata_vsc

sata_uli

sata_sis

sata_sx4

sata_nv 

sata_via

sata_svw

sata_sil

sata_promise

libata

sbp2 

ohci1394

ieee1394

sl811_hcd

ohci_hcd

uhci_hcd

usb_storage

usbhid

ehci_hcd

usbcore

```

----------

## daeghrefn

Yeah, the 8139cp module is the driver that's being loaded for your NIC.  Post the contents of:

```
# ifconfig

# cat /etc/conf.d/net
```

and also, what does dmesg tell you?  Several ways to check using grep:

```
# dmesg | grep eth

# dmesg | grep 8139cp
```

That should tell you whether or not there are problems loading the drivers or associating the drivers with a device name (I.E. ethX)

----------

## jkb

K,

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 packets: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)
```

cat:

```
#config_eth0=( "dhcp" )

#dhcp_eth0="nodns nontp nonis"

# This is basically the ifconfig argument without the ifconfig $iface

#

#iface_eth0="dhcp"

#dhcpcd_eth0="nodns nontp nonis"

iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

#modules=( "dhcpcd" )

#eth0="dhcp"

#iface_eth0="dhcp"

#dhcpcd_eth0="..."

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.  Leave commented to assign

# defaults for that interface.

#

#broadcast_eth0="192.168.0.255 192.168.0.255"

#netmask_eth0="255.255.255.0 255.255.255.0"

# For setting the default gateway

#

#gateway="eth0/192.168.0.1"
```

grep  for 8139cp(eth didnt work):

```
8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

8139cp: pci dev 0000:03:0a.0 (id 10ec:8139 rev 10) is not an 8139C+ compatible chip

8139cp: Try the "8139too" driver instead.
```

----------

## daeghrefn

Okay, I am going to assume that you do not understand what the information is telling you, so I will try to help you along in understanding what you just posted.  If you know this already, please don't be offended, I am not critisizing you, only trying to help.

Typing ifconfig on a command line by itself lists ALL network adapters.  As you can see, only the loopback (lo) device is loaded.  There is no ethX adapter present.

the file /etc/conf.d/net is the configuration file for network devices.  You should be able to see the problem there, and I am going to have to tell you to RTFM.  You should go back to the Gentoo Installation guide for your architecture, and find the page on configuring your network.  I will link the guide for the x86 document here http://www.gentoo.org/doc/en/handbook/2005.1/handbook-x86.xml?part=1&chap=8#doc_chap2.  Scroll down a bit to the section on Network Configuration.  I will give you a hint, however.  Since you configured your NIC for a static IP, you need to configure a default gateway.  After you have read that, if you still have questions, please ask.

The third part is a little more tricky.  dmesg is where you get messages from the kernel.  By using the grep tool, you were able to print out only the lines which contained your search string.  The reason that eth didnt' work is because no drivers were associated with an eth device.  However you did find a kernel message for the 8139cp driver.  As you can see, you are loading the wrong driver for your NIC card.  It even tells you the correct driver to load, the 8139too driver.  Open up your kernel configuration via the following:

```
# cd /usr/src/linux

# make menuconfig
```

This will run the text based gui for configuring your kernel.  Enable the 8139too driver here:

```
Device Drivers -->

   Networking support -->

      Ethernet (10 or 100Mbit) -->

         [*] EIS, VLB, PCI and on board controllers

         <*> RealTek RTL-8139 PCI Fast Ethernet Adapter support
```

If you prefer, instead of compiling the driver into the kernel (hence the *) you can compile it as a module (put in a M instead).  Recompile your kernel and copy it to your /boot partition.  If you forgot how to do that, refer back to the Gentoo Installation Handbook kernel section.

Reboot your PC once you've recompiled and recopied your kernel, and fixed your /etc/conf.d/net file.  Then use the commands I showed you before, and you should be able to see eth0.

when you're done, make sure you have added it to the startup rc scripts

```
# rc-update add net.eth0 default
```

Good luck, if you have any questions, let me know.

----------

## blommethomas

I got problems compliling my internet on a realtek too:

found an answer in

found an answer in here: 

https://forums.gentoo.org/viewtopic-p-2648166.html

That's it ! 

 *Quote:*   

> Step : 
> 
> 0- Boot with LiveCD 2005.1 
> 
> 1- #net-setup eth0 (config network to emerge !) 
> ...

 

Then I still got these errors:

 *Quote:*   

> Starting eth0 
> 
> Bringing up eth0 
> 
> dhcp 
> ...

 

This was solved too when I emerged dhcpcd

I hope this helps

----------

## jkb

Thanks a lot both of you!

Because it's simpler I'll try blommethomas' instructions first, thank you!

daeghrefn:

 *Quote:*   

> Okay, I am going to assume that you do not understand what the information is telling you, so I will try to help you along in understanding what you just posted. If you know this already, please don't be offended, I am not critisizing you, only trying to help.

 

Quite right, I dont understand most of it  :Very Happy:  . Not that I looked at it much, but anyway. I wouldn't be offended anyway even if I did know, that would be silly of me. I very much appreciate your help.

 *Quote:*   

> Typing ifconfig on a command line by itself lists ALL network adapters. As you can see, only the loopback (lo) device is loaded. There is no ethX adapter present. 

 

Ahh! I understand that.

 *Quote:*   

> the file /etc/conf.d/net is the configuration file for network devices. You should be able to see the problem there, and I am going to have to tell you to RTFM. You should go back to the Gentoo Installation guide for your architecture, and find the page on configuring your network. I will link the guide for the x86 document here http://www.gentoo.org/doc/en/handbook/2005.1/handbook-x86.xml?part=1&chap=8#doc_chap2. Scroll down a bit to the section on Network Configuration. I will give you a hint, however. Since you configured your NIC for a static IP, you need to configure a default gateway. After you have read that, if you still have questions, please ask.

 

I see, and if blommethomas' instructions dont work, I will follow thru with those. I used the i686 arch(I beleive it's mine from something SuSE said). Is my NIC configged for a static IP? If so, that should be fixed too  :Very Happy:  . I'm behind a router and my locel IP is static, but my internet IP is not.

And to all the rest of your instrucs, I certainly appreciate them and will follow them out if nothing comes of BT's steps. I dont have any specific things to ask from them tho  :Very Happy: 

----------

## daeghrefn

Right, there is a problem in his /etc/conf.d/net file.  And the way he has it set up with a static address, he doesn't need to emerge dhcpcd.  He needs to add a default gateway.  Another solution for his problem would be to emerge dhcpcd and configure his interface to load with dhcp, therefor not needing to define a default gateway, but unless he has a dhcp server on his network that won't work.

The real reason his interface isn't loading is because the drivers are not loading, because he didn't compile the correct drivers for his card.  Once he loads the correct drivers the interface will come up.  Once he corrects his /etc/conf.d/net file, his interface will then correctly talk with the network.

Since he has a properly booting system, he won't need to use the Live CD.

----------

## jkb

Ok, thomas' instructions didn't work - and I tried doing thru your's daeg too, it's set up using DHCP but still not working - at boot it gives me this error:

```
Problem starting needed services

"netmount" was not started
```

I used "make menuconfig", to set up my card and there was only 2 Realteks - one of which was experimental and it's not my card.

Any more suggestions? Thanks!

----------

## daeghrefn

Alright.  Post the contents of the following again:

```
# ifconfig

# cat /etc/conf.d/net

# dmesg | grep eth

# dmesg | grep 8139

# rc-status

# rc-update -s
```

Not sure why netmount isn't there... we'll figure it out though.

----------

## jkb

Right, I'll get that ASAP.

 *Quote:*   

> we'll figure it out though

 

Thank you very very much, that's encouraging to me.  :Very Happy: 

----------

## jkb

Ok, I took it easier this time and uploaded them:

http://www.jomitech.com/jkb/Gentoo/ifconfig.txt

http://www.jomitech.com/jkb/Gentoo/cat.txt

http://www.jomitech.com/jkb/Gentoo/grep_eth.txt

http://www.jomitech.com/jkb/Gentoo/grep_8139.txt

http://www.jomitech.com/jkb/Gentoo/rc-status.txt

http://www.jomitech.com/jkb/Gentoo/rc-update.txt

----------

## daeghrefn

you need to go back to your kernel settings and double check them.  The driver (not the EXPERIMENTAL one) is the one you need.

Also, did you remove some of the dependancies?  Look at this:

```
8139cp: Unknown symbol mii_ethtool_sset

8139cp: Unknown symbol mii_check_media

8139cp: Unknown symbol mii_nway_restart

8139cp: Unknown symbol generic_mii_ioctl

8139cp: Unknown symbol mii_ethtool_gset
```

This says to me that you removed the mii, or generic device driver.  Let's go back to the kernel, and make sure you have everything you need... again, if you prefer you can compile as modules instead built-in.

```
Device Drivers -->

   Networking support -->

      [*] Networking support

      [*] Network device support

      Ethernet (10 or 100Mbit) -->

         [*] Ethernet (10 or 100Mbit)

         <*> Generic Media Independant Interface device support

         [*] EIS, VLB, PCI and on board controllers

         < > RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)

         <*> RealTek RTL-8139 PCI Fast Ethernet Adapter support
```

If you prefer to use modules it could look like this:

```
Device Drivers -->

   Networking support -->

      [*] Networking support

      [*] Network device support

      Ethernet (10 or 100Mbit) -->

         [*] Ethernet (10 or 100Mbit)

         <M> Generic Media Independant Interface device support

         [*] EIS, VLB, PCI and on board controllers

         < > RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)

         <M> RealTek RTL-8139 PCI Fast Ethernet Adapter support
```

Now if there are other drivers either compiled as modules (M) or compiled into the kernel (*) just leave them for now.  Don't take anything else out, otherwise you may remove some dependancies.  Once you've made your modifications, rebuild your kernel, mount your boot partition, copy the kernel, system map and config to the /boot partition:

```
# make && make modules_install

# mount /dev/hda1 /boot

# cp arch/i386/boot/bzImage /boot/kernel-2.6.x.x

# cp System.map /boot/System.map-2.6.x.x

# cp .config /boot/config-2.6.x.x
```

Make sure to use filenames consistent with how you have done them in the past.  I use the kernel version number, which for me is currently 2.6.12.5.

The problem is, as dmesg is telling you, that your kernel does not have the drivers for your NIC card.  The other file configuration issues aren't really even related right now.

Once you have rebooted and loaded the new kernel, post the results of the following again:

```
# ifconfig

# dmesg | grep eth

# dmesg | grep 8139
```

That'll get us started right away.  Good luck.

----------

## jkb

Ok, I went to "make menuconfig", etc - but the "Generic Media Independent Interface Device Support", instead of "<M>" or "< >", it just has "---"

And it doesn't listen to enabling it

What's wrong?

----------

## daeghrefn

Post up your /usr/src/linux/.config file

----------

## jkb

Right, here: http://jomitech.com/jkb/Gentoo/config.txt

----------

## daeghrefn

Browsing over it, it looks good.  Compile everything and all the modules, copy the stuff over and reboot your machine.  Lets see what it does next.

----------

## jkb

Ok, done that and here:

http://www.jomitech.com/jkb/Gentoo/ifconfig.txt

http://www.jomitech.com/jkb/Gentoo/cat.txt

http://www.jomitech.com/jkb/Gentoo/grep_eth.txt

http://www.jomitech.com/jkb/Gentoo/grep_8139.txt

And there was a message in the boot, something about 8139 - I could write it down if you want it

----------

## daeghrefn

post the following:

```
# lspci

# lsmod

# cat /etc/modules.autoload.d/kernel-2.6
```

also what happens if you type:

```
# modprobe 8139too
```

The problem is that the proper kernel modules are not being loaded... and I don't understand why..

----------

## jkb

Here's the boot error:

```
coldplugging pci devices

modprobe: fatal; error inserting 8139cp (/lib/module/2.6.14-gentoo-r4/kernel/drives/net/8139cp.ko: unknown symbol in module or unknown parameter see dmesg

... can't load module 8139cp

missing kernel or user mode driver 8139cp
```

And the files:

[url]http://www.jomitech.com/jkb/Gentoo/lsmod.txt [/url]

[url]http://www.jomitech.com/jkb/Gentoo/lspci.txt [/url]

http://www.jomitech.com/jkb/Gentoo/modules_autoload.txt

modprobe 8139too didn't pipe - but anyway - it just said "FATAL: module 8139too not loaded" or something like that

and modprobing 8139cp produced the error on boot.

----------

## daeghrefn

is the contents of dmesg | grep 8139 the same?  Sounds like it wants the 8139cp driver.  Something sure isn't right, and it is from within the kernel.

EDIT: On second thought, make sure that BOTH the RealTek drivers in the kernel config are set to M for modules.  Then execute

```
make modules && make modules_install
```

Then try to modprobe both 8139cp and modprobe 8139too

----------

## jkb

grep 8139 is unchanged.

I'll try that now...then tell you what happens.

Thanx again.

----------

## jkb

Ok, moduled them(the xperimental one was already, the usual one was <*>), here's what happens with probing them:

```
FATAL: Error inserting 8139too( or cp ) (/lib/modules/2.6.14-gentoo-r4/kernel/drivers/net/8139too( or cp ).ko): Unknown symbol in module, or unknown parameter (see dmesg)
```

----------

## daeghrefn

Sorry for the late reply, was doing a runescape quest with the wife.

Post the output of

```
# dmesg | grep 8139
```

Lets see why the too driver isn't loading.

----------

## jkb

 *daeghrefn wrote:*   

> Sorry for the late reply, was doing a runescape quest with the wife.

 

Hehe, sorry for my late reply - I'm off Sundays.

Ok, Here's grep:

```
8139cp: Unknown symbol mii_ethtool_sset

8139cp: Unknown symbol mii_check_media

8139cp: Unknown symbol mii_nway_restart

8139cp: Unknown symbol generic_mii_ioctl

8139cp: Unknown symbol mii_ethtool_gset
```

----------

## daeghrefn

The problem is obviously that for some reason the 8139cp driver isn't working with your card.  I think you proved the 8139too driver didn't work either.  You could either try a different kernel build, or try a different card.  Without having your system in front of me, I can't think of anything else you could do to try to fix it.  Maybe someone else has your card and can give you suggestions.

I wish I could have better helped.

----------

## guduri

Have you tried doing a clean build of the kernel?

----------

## jkb

daeghrefn:

Hmm, was the 8139too driver ever loading - judging by what I read, it didn't seem to be trying to load. It's strange tho, because the last time I installed Gentoo(same mobo, same all) - this was not a problem.

guduri:

How do I do that?

----------

## daeghrefn

That's a good idea.  Rename /usr/src/linux/.config to something like config.bak or something.  Then run make menuconfig and reconfigure your kernel.  Then recompile it.  That is how I would do it.

But yeah, it sounds like the 8139too driver isn't what the card wants.  And there's a problem with the 8139cp driver.  You could also upgrade / downgrade your kernel, or try the vanilla-sources kernel if you use gentoo-sources, or vice versa.

----------

## jkb

 *Quote:*   

> That's a good idea. Rename /usr/src/linux/.config to something like config.bak or something. Then run make menuconfig and reconfigure your kernel. Then recompile it. That is how I would do it.

 

Right, I'll try that.

 *Quote:*   

> But yeah, it sounds like the 8139too driver isn't what the card wants. And there's a problem with the 8139cp driver. You could also upgrade / downgrade your kernel, or try the vanilla-sources kernel if you use gentoo-sources, or vice versa.

 

What would be wrong with 8139too that it isn't the right one? How could I upgrade/downgrade? What's a vanilla-source kernel?

Sorry for my questions - pardon a newbie   :Smile: 

----------

## daeghrefn

Well, the kernel has two different RealTek drivers, the 8139cp and 8139too.  Not sure which one your card wants, or needs.

Secondly, kernels come in 2 types: vanilla-sources, or basically the same kernel that is passed out by the kernel devs (correct me if I'm wrong, anyone) and is un-modified by Gentoo devs.  And then gentoo-sources, which is modified by the Gentoo devs to suit the distro's needs.  THis can include added features, security, etc.  They are two separate kernels, and you can have both installed on your system, but of course you can only run one at a time (which you select at bootup via grub or lilo, whichever you chose to install).

Most likely if you followed the handbook, you installed the gentoo-sources kernel.  To install the vanilla-sources kernel, just run:

```
# emerge vanilla-sources

# ls /usr/src
```

That will add to your sources.  The second command will list your kernel options.  I don't recommend messing with that unless you are extreemly comfortable with configuring, compiling and installing a kernel.

----------

## derFrank

Hello,

seems that I've run into the same problem here with my machine...

but maybe I can add some additional information: I was actually running the gentoo-sources 2.6.7 till today, but due to some application requesting a kernel >=2.6.14 during a world update, I thought it might be a good idea to switch to a newer kernel anyways, so i just compiled the 2.6.15 gentoo-sources...

Well, thats how I ran into the problem with my rtl8139 not working anymore... if I switch back to the 2.6.7 kernel, everything works as expected...so it seems something has changed somewhere in between...

Didn't find a solution for the issue by now, but am going to try a little bit further...

Maybe anyone else has found out something in the meantime (since the last post of this thread is already 6 weeks old)..

bye Frank

----------

## jkb

Well - I've replaced my mobo now. Now I've got an ASUS P4P800-E Deluxe. I decided to go SuSE this time. Still - things aren't working right. It installed fine - but now I'm trying to use a wireless card and network with WPA-PSK. Any suggestions as how to get this to work?

----------

