# net.eth1 wont start at bootup

## Vlad

Alright, I just did a clean install on a system of Gentoo 2006.0.  I have two network cards, an onboard one and a PCI gigabit one.  When activated independently of the init scripts, both work fine.  My goal is to use eth1 and not eth0 (eth0 is infact unplugged).

I've linked net.lo to both net.eth1 and net.eth0.  I've setup my /etc/conf.d/net file according to my needs.  net.lo starts up just fine.  The modules are loaded while it's booting, and I can see them as soon as I log in.

As I said, I use eth1, so I've added net.eth1 to the default runlevel.  When I reboot my machine, however, it only brings up the lo interface, and ignores eth1 completely.  If I try to start it immediately after booting and logging in, 

```

node2 ~ # /etc/init.d/net.eth1 start

 * WARNING:  net.eth1 has already been started.

```

If I run ifconfig, it lists the device but does not show it as having an IP address.  I'm using dhcpcd 2.0.2, and it is not running.

Strangely, running rc-status shows net.eth1 as inactive.

If I run /etc/init.d/net.eth1 restart, it first brings down the interface, then starts the interface as expected.  I've tried clearing the contents of /var/lib/dhcpc, /var/lib/init.d/ anything else that might be related.  I've also remerged various packages (hotplug, coldplug, baselayout, dhcpcd, etc) in hopes that a conf file was updated (it wasn't).   I'm using baselayout-1.2.0_pre16-r3.  I tried searching through the forums and bugs.gentoo.org to no avail.  Any help or ideas would really be appreciated, this seems to be an init script problem :)

Vlad

----------

## TheRAt

Do you get any messages when you are booting up with respect to net.eth1 (ie. maybe that it is trying to get the IP address in the backgroud, etc)??

Also, are the drivers for the card you are trying to use compiled into the kernel, or built as module?

If module, is it listed in your /etc/modules.autoload.d/kernel-2.6 ??

----------

## Vlad

Should have given some more details about the kernel.

The drivers are compiled as modules and are loaded while the system is booting (they show up in dmesg).  They are not in the autoload file.

Absolutely *nothing* is printed about eth1 starting, no error message, no notification, nadda (that sure would make this a hell of a lot easier though).

----------

## TheRAt

Are you sure that /etc/init.d/net.eth1 is a link to /etc/init.d/net.lo, and it is in the default runlevel

```
root@io ~ # ls -l /etc/init.d/net.eth1

lrwxrwxrwx 1 root root 6 Mar  6 23:51 /etc/init.d/net.eth1 -> /etc/init.d/net.lo

root@io ~ # rc-update add net.eth1 default

* net.eth1 already installed in runlevel default; skipping
```

----------

## Pete M

Vlad

Does your board have firewire

Check dmesg and lsmod see if eth1394 is loaded, if so add this module to /etc/hotplug/blacklist then try a reboot

Sometimes this module takes control of your network interface

Pete

----------

## Vlad

Nope.  Firewire has neither been included in my kernel or built as a module, nor is the hardware present on my system.

----------

## TheRAt

could you post your ifconfig -a after your restart..

post output also from lsmod

----------

## UberLord

Try upgrading to dhcpcd-2.0.3

----------

## Vlad

I'm absolutely positive net.eth0 and net.eth1 are symlinks to net.lo.  I'm absolutely positive that they're added to the default run level.  I've been using Gentoo since before these forums opened =/  I don't think that this is a firmware issue, as this machine had a ~6 month old Gentoo install on it that worked without issue (I don't think any of the modules load firmware, anyways).

I first tried install dhcpcd-2.0.3.  That had no effect.

Now, ifconfig -a shows that the interface *did* recieve an IP address.  But there's absolutely no mention of it being started (net.lo is shown however).  On a hunch, I tried removing the forcedeth module and reverting to a single network card configuration.  My problems remain mostly unchanged, however, after booting up, I do not see anything about net.eth0 starting, syslog-ng, nfsmount, and sshd all fail because net.eth0 was not started.  After logging in, I can ping the internet, the device shows up in ifconfig as I would expect it to (has an IP address, etc), and rc-status shows net.eth0 as started!  Very strange.  Smells like somethings amiss with baselayout-1.20.0_pre16-r3.

And yes, all the config files are updated.  I've also checked to make sure that kernel level autoconfiguration is off, even though that shouldn't be an issue on this network.

Here's the output of ifconfig -a, minus the loopback:

```

eth0      Link encap:Ethernet  HWaddr 00:50:70:74:42:39

          UP BROADCAST NOTRAILERS 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:16 Base address:0xc000

eth1      Link encap:Ethernet  HWaddr 00:40:F4:BB:31:F2

          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:4626 (4.5 Kb)  TX bytes:3182 (3.1 Kb)

          Interrupt:20 Base address:0xe000

```

And the output of lsmod:

```
Module                  Size  Used by

nfs                    90540  1

lockd                  56136  2 nfs

sunrpc                134524  3 nfs,lockd

nvidia               4087824  0

r8169                  25288  0

forcedeth              20868  0

ehci_hcd               26888  0

ohci_hcd               18692  0

i2c_nforce2             6208  0

nvidia_agp              7260  1

agpgart                31752  2 nvidia,nvidia_agp

usbcore               112516  3 ehci_hcd,ohci_hcd

```

I appreciate your guys' assistance. :)

----------

## TheRAt

Do you by any chance have RC_PARALLEL_STARTUP="yes" in your /etc/conf.d/rc..

I had some strange issues with that on startup, including how it dealt with my wireless on startup..

----------

## Vlad

 *TheRAt wrote:*   

> Do you by any chance have RC_PARALLEL_STARTUP="yes" in your /etc/conf.d/rc..
> 
> I had some strange issues with that on startup, including how it dealt with my wireless on startup..

 

Nope, parallel startup is not enabled.  I haven't done very much at all to the default configuration, other than updating the usual suspects to match my system (clock, net, domainname, hostname, etc).

----------

## ewie

Just wanted to add a "me too" post.

My setup is a little different, with a via-rhine (eth0) and a rt2570 (rausb0), but the rt2570 never shows anything on boot. Only after a manual restart the interface comes up correctly.

I suspect coldplug or udev or both, my baselayout is stable.

/me Will be hacking initscripts now...

----------

## b-s-a

Tomorrow I try to upgrade baselayout (from 1.11.14-r7 to 1.12.0_pre17) on my server (router) and receive same problem. When system is booting eth0 and eth2 do not receive any address. But they state is up. I can manually restart /etc/net.eth0 (for example). But when I restart other net.* interface eth0 lose address.

With baselayout-1.11.14-r7 no this problem.

/etc/conf.d/net:

```

modules=(   "iproute2"

            "dhcp" )

config_eth0=( "192.168.0.1/24 brd 192.168.0.255" )

config_eth1=( "dhcp" )

dhcpcd_eth1=( "-t 20" )

fallback_eth1=( "192.168.253.19/26 brd 192.168.253.63" )

dhcp_eth1="nodns nogateway nontp"

routes_eth1=(

    "192.168.19.230 via 192.168.253.1"

    "192.168.30.25 via 192.168.253.1"

    "192.168.253.1"

)

config_eth2=( "10.67.4.114/24 brd 10.67.4.255" )

routes_eth2=(

    "10.0.0.0/8 via 10.67.4.1"

    "192.168.0.0/16 via 10.67.4.1"

    "172.16.0.0/12 via 10.67.4.1"

    "213.33.170.0/24 via 10.67.4.1"

    "81.211.62.0/24 via 10.67.4.1"

)

```

----------

