# net.eth0 doesn't work at boot [SOLVED]

## audiodef

My net.eth0, according to what I see scrolling by at boot, seems fine. It gets an IP lease and no errors are reported. Yet, there is no connection. I can fix it simply by opening a terminal and doing /etc/init.d/net.eth0 restart. 

What's happening and how do I fix it?

----------

## d_logan

What's in your 

```
rc-update show
```

?

----------

## d2_racing

Also, do you use openRC and what is the content of /etc/resolv.conf when you boot ?

----------

## audiodef

net.eth0 is in my default runlevel and /etc/resolv.conf has the correct nameservers.

----------

## d_logan

Does ip route ls show your correct gateway?

Is anything else running like NetworkManager or wicd daemons?

----------

## Roman_Gruber

do you use openrc or the older solution??

What initscript do you use?

```
emerge --info; eix openrc
```

 pls

----------

## audiodef

No, no networkmanager or anything else. Just straight net.eth0 in my default runlevel. Again, if I /etc/init.d/net.eth0 restart manually, it's fine. It's just not actually connected at boot despite the standard dhcpcd messages saying it is. 

I'm using openrc 0.5.1. 

emerge --info:

```

Portage 2.2_rc46 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.10.1-r0, 2.6.30-gentoo-r6 i686)

=================================================================

System uname: Linux-2.6.30-gentoo-r6-i686-Intel-R-_Celeron-R-_CPU_2.40GHz-with-gentoo-2.0.1

Timestamp of tree: Mon, 12 Oct 2009 17:00:01 +0000

app-shells/bash:     4.0_p33

dev-java/java-config: 2.1.9-r1

dev-lang/python:     2.6.3, 3.1.1-r1

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.5.1

sys-apps/sandbox:    2.1

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.10.2, 1.11

sys-devel/binutils:  2.19.1-r1

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86 ~x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /etc/conf.d/clock /etc/conf.d/hostname /etc/conf.d/net /etc/conf.d/xdm /etc/hosts /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X acl alsa apache2 aspell berkdb bzip2 cleartype cli cracklib crypt cups cupsddk dbus dri fortran gdbm gif gnome gpm gtk hal iconv id3tag ipv6 isdnlog java jpeg mmx modules mp3 mudflap mysql mysqli ncurses nls nptl nptlonly openmp pam pcre perl png ppds pppd python readline reflection samba scanner session shout smbclient spl sse sse2 ssl svg sysfs tcpd tiff truetype unicode win32codecs x86 xcf xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

----------

## d2_racing

Ok, can you post this then :

```

# emerge -av openrc

```

----------

## Roman_Gruber

 *audiodef wrote:*   

> 
> 
> I'm using openrc 0.5.1. 
> 
> 

 

----------

## gringo

what version of dhcpcd have you installed ?

cheers

----------

## VooDooSuN

Hey Hey,

got the same problem..

To fix this: 

```

dhcpcd ethX

emerge -av =sys-apps/openrc-0.4.3-r4

etc-update

```

That did the trick for me...

Cheers 

Voody

----------

## audiodef

So downgrading openrc fixed it for you? 

I have dhcpcd 5.1.1.

 *VooDooSuN wrote:*   

> Hey Hey,
> 
> got the same problem..
> 
> To fix this: 
> ...

 

----------

## VooDooSuN

Hey,

jep... only downgrade did it...

any other way, didnt changed something

Cheers

----------

## audiodef

Then it sounds like there might be a bug in openrc-0.5.1. Anyone else have any issues with this version? I'm thinking of filing a bug report.

----------

## das bletch

when you boot, do you watch eth0 negotiate a lease? If my box isn't plugged into a router (or if the router needs a reset), I'll get leased an old ip address, so it'll LOOK like I'm connected when I'm actually not.

also, by default run level, does that mean after you've loaded all modules? Did you compile your networking modules inside the kernel or as loadable modules?

----------

## audiodef

I do watch eth0 negotiate a lease, and it seems to do so. And this is after all modules, but that's moot because my net driver is compiled into the kernel.

----------

## VooDooSuN

i got also my Net inside the kernel, but i recive every time under openrc 5.1 

smthing like error at line 510.

If you take a look at this thread, there are def. big changes to the network inits from openrc

https://forums.gentoo.org/viewtopic-t-796647.html

Cheers

----------

## xenon

Same issue here, gonna try openrc-0.5.1-r1 with oldnet right now.

By the way, I also have a minor issue where manually launching

```
#/etc/init.d/net.eth0 restart
```

I won't automatically go back to the shell prompt, it hangs on the latest output [OK] line and I need to Control-C it. Any idea about this?

----------

## audiodef

I solved it by masking 0.5.1. I guess there's a bug in that version.

Thanks, Voody!

----------

## xenon

Both of my problems are still there with 0.5.1-r1.

----------

## VooDooSuN

Hey Hey,

i just installd the openrc 0.5.2

it solved all my problems, out of the box

maybe u can give it a try  :Wink: 

Take care and cheers

----------

## d2_racing

Nice to hear that  :Razz: 

----------

## xenon

Will try it ASAP.

----------

