# No eth0 in /dev

## mrpringle

Hey,

My gentoo system was running fine. Just today I put a new motherboard in my PC, but same everything else, including hard drive.

Gentoo still works okay, but it gives me an error saying that eth0 was not found. It isn't listed under /dev, but I'm not sure why.

Here is the printout of my dmesg.

Just in case it is relevant the new motherboard is a Gigabyte P35-DS4, and the old one was a Gigabyte 965P-S3.

Any help would be appreciated.

Thanks

 *Quote:*   

> 
> 
> Linux version 2.6.22-gentoo-r9 (root@ablack) (gcc version 4.1.2 (Gentoo 4.1.2)) #1 SMP Sat Nov 17 16:52:25 EST 2007
> 
> BIOS-provided physical RAM map:
> ...

 

----------

## tylerwylie

You'll probably have to recompile your kernel for the correct drivers.  Although it is loading a module I doubt that's the one you need.

----------

## mrpringle

 *tylerwylie wrote:*   

> You'll probably have to recompile your kernel for the correct drivers.  Although it is loading a module I doubt that's the one you need.

 

I forgot to mention I am using genkernel, and I have recompiled since the new motherboard, but I could not find the exact realtek drivers in menuconfig

----------

## mark_alec

Network interfaces do not appear in /dev. Post the output of 'ifconfig -a'

----------

## mrpringle

 *mark_alec wrote:*   

> Network interfaces do not appear in /dev. Post the output of 'ifconfig -a'

 

eth1      Link encap:Ethernet  HWaddr 00:1A:4D:54:74:68  

          BROADCAST MULTICAST  MTU:1500  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:1000 

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

          Interrupt:17 Base address:0xe000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:336 (336.0 b)  TX bytes:336 (336.0 b)

After a second attempt I was able to configure eth1 and get my pc online. My next question is whether I can make my network adapter appear as eth0 or how can I fix my startup scripts in /etc/init.d to work with eth1?

Thanks

----------

## Rikai

Since most network devices are persistent, udev doesn't get rid of them by default.

# rm /etc/udev/rules.d/70-persistent-net.rules

And udev will forget about the old network devices and eth1 should become eth0.

You could also

# ln -s /etc/init.d/net.eth0 /etc/init.d/net.eth1

# rc-update del net.eth0

# rc-update add net.eth1 boot

to use eth1 on boot instead of eth0.

----------

## mrpringle

 *Rikai wrote:*   

> Since most network devices are persistent, udev doesn't get rid of them by default.
> 
> # rm /etc/udev/rules.d/70-persistent-net.rules
> 
> And udev will forget about the old network devices and eth1 should become eth0.
> ...

 

Thank you very much for this info. I will give it a try.

----------

## mrpringle

Ok, I deleted the 70-persistent-net.rules and now when I start gentoo dhcpcd times out and the ethernet link is always down for some reason when everything is connected.

 * Starting eth0

 *   Bringing up eth0

 *     dhcp

 *       Running dhcpcd ...

Error, eth0: timed out                                                    [ ok ] *       eth0 received address 169.254.209.71/16

----------

## Knute

You didn't!   :Exclamation:   :Rolling Eyes: 

Ok,  the simple way to fix it, other than just editing it  rather and deleting it   :Wink:  ,  is to simply stop and then restart udev.

----------

## mrpringle

 *Knute wrote:*   

> You didn't!   
> 
> Ok,  the simple way to fix it, other than just editing it  rather and deleting it   ,  is to simply stop and then restart udev.

 

I have rebooted several times though. Why would stopping and starting udev help?

----------

## Knute

From what I read, if you delete the 70-persistent-net.rules file and then stop and restart udev, it should rebuild the rule.

I did a quick google search using "udev rules regenerate". 

I can post mine if you want, but since the rule contains MAC address and such, it probably won't help u too much.

I had this issue come up on me and all I had to do was to take out the lines for eth0 and such, and then change the eth2 (I think) back to eth0 and restarted the network services and I was back in business.    :Smile: 

----------

## mrpringle

 *Knute wrote:*   

> From what I read, if you delete the 70-persistent-net.rules file and then stop and restart udev, it should rebuild the rule.
> 
> I did a quick google search using "udev rules regenerate". 
> 
> I can post mine if you want, but since the rule contains MAC address and such, it probably won't help u too much.
> ...

 

Ok, so the rule rebuilt correctly (as far as I can tell) with the mac address of the network adapter being named eth0 now, instead of eth1. If I try and assign an IP address on eth0 however I am unable to ping my adsl router which is directly connected?? The link on my ethernet port stays unlit at all times and flapping the interface to down and up using ifconfig does nothing.

I have tried deleting all my genkernel configs and rebuilding my kernel and modules. I have also tried remerging udev.

If I type dhcpcd eth0 it times out and gives me some IP address which means nothing basically. The dmesg boot logs also tell me the link is down on eth0.

The ethernet adapter is working okay because I am using it right now in Windows (so that can be ruled out). I have also been online once in gentoo since the motherboard switch. This happened before I deleted the 70-persistent-net.rules file, and tried dhcp on eth1, which was successful.

----------

## mrpringle

I'm bumping this post because I have no idea what to try and I really need my network up and running or else my ebuilds will get too far out of date. Another problem is I have a samba and ssh server running off the PC, which I obviously can't use without network connectivity.

Why is the link down when a cable is plugged in .The network adapter is detected properly under gentoo, but the link light never comes on. It does work fine when I boot into windows though.

One thing I find really strange is the fastethernet worked when I first switched motherboards and the new network adapter was listed under eth1, but after deleting and rebuild the udev net rules I can no longer get the eth1 interface to come online?

Actually, just another thought my mobo has an IEEE1394 port as well. Would it be possible that eth0 is actually that port instead of my on-board gigabit ethernet?

Any assistance or suggestions would be much appreciated.

----------

## mrpringle

This sounds exactly like my problem. I will try this fix when I get home

http://gentoo-wiki.com/HARDWARE_RTL8168

----------

## trossachs

My prob is this:

```
(chroot) livecd / # /etc/init.d/spamd start

/etc/init.d/net.eth0: line 34: /lib/rcscripts/net.modules.d/helpers.d/functions: No such file or directory

 * Starting

 *       no interface module has been loaded

/etc/init.d/net.eth1: line 34: /lib/rcscripts/net.modules.d/helpers.d/functions: No such file or directory

 * Starting

 *       no interface module has been loaded

/etc/init.d/net.lo: line 34: /lib/rcscripts/net.modules.d/helpers.d/functions: No such file or directory

 * Starting

 *       no interface module has been loaded

/etc/init.d/net.eth0: line 34: /lib/rcscripts/net.modules.d/helpers.d/functions: No such file or directory

 * Starting

 *       no interface module has been loaded

/etc/init.d/net.eth1: line 34: /lib/rcscripts/net.modules.d/helpers.d/functions: No such file or directory

 * Starting

 *       no interface module has been loaded
```

Had probs with dodgy RAID controller, sorted but now this. When I use my livecd, all is fine even when chrooted into the existing environment. As soon as I start to try and load up some apps, I get this error.

----------

## xbmodder

That's -bad-

Did you do an etc-update?

Did you muck around with files outside of /etc?

----------

## trossachs

Right now I'm stuck with this:

```
* Your current setup is using one or more of the following modules,

 * that are not built or supported anymore:

 * pam_pwdb, pam_radius, pam_timestamp, pam_console

 * If you are in real need for these modules, please contact the maintainers

 * of PAM through http://bugs.gentoo.org/ providing information about its

 * use cases.

 * Please also make sure to read the PAM Upgrade guide at the following URL:

 *   http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml

 *

>>> Unpacking source...

>>> Unpacking Linux-PAM-0.99.9.0.tar.bz2 to /var/tmp/portage/sys-libs/pam-0.99.9.0/work

 * Applying Linux-PAM-0.99.7.0-disable-regenerate-man.patch ...                                                             [ ok ]

 * Applying Linux-PAM-0.99.8.1-xtests.patch ...                                                    
```

Have updated everything in /etc/pam.d and it still calls this error!!!

----------

## chanakam2000

 *mrpringle wrote:*   

>  *mark_alec wrote:*   Network interfaces do not appear in /dev. Post the output of 'ifconfig -a' 
> 
> After a second attempt I was able to configure eth1 and get my pc online. My next question is whether I can make my network adapter appear as eth0 or how can I fix my startup scripts in /etc/init.d to work with eth1?
> 
> Thanks

 

see /etc/conf.d/net.example

There is an option to change your network interface nam

```

rename_001122334455="foo1"
```

where 001122334455 is your MAC address & foo1 is your desired name.

Cheers !

----------

## Monkeh

 *trossachs wrote:*   

> Right now I'm stuck with this:
> 
> ```
> * Your current setup is using one or more of the following modules,
> 
> ...

 

What error?

----------

## trossachs

Sorted with 2.6.23. cheers!   :Very Happy: 

----------

