# can not get network up on boot [SOLVED]

## zaphyr

I have installed gentoo on my box now, its a little different in the 2005.0 edition by the way.

when i boot the box, I get this error:

```
Starting eth0

   Bringing up eth0

      dhcp

         Running dhcpcd

ERROR: Problem starting needed services.

             "netmount" was not started.
```

after that i can log on and if I do the following, I get an IP from the DHCP server

```
dhcpcd eth0
```

Why is this not working from boot??

PS. I have done a rc-update add net.eth0 defaultLast edited by zaphyr on Fri Jul 15, 2005 7:05 am; edited 1 time in total

----------

## RayDude

 *zaphyr wrote:*   

> I have installed gentoo on my box now, its a little different in the 2005.0 edition by the way.
> 
> when i boot the box, I get this error:
> 
> ```
> ...

 

I have this problem periodically with wireless, I don't think I've ever had it with ethernet. As a guess I'd say if you have the ethernet driver compiled as a module, make sure you list it in /etc/modules.autoload.d/kernel-2.6 (assuming you are using kernel-2.6).

Forcing the module to load earlier seems to make things behave better for me.

You also may want to make sure that you haven't got an IP Addy after bootup, because I thought dhcpcd would report an error at boot up (before you'd see the netmount failure) if it can't assign. Netmount not running could indicate that you don't have proper nfs configs or something like that, it doesn't necessarilly mean that ethernet is not running.

One last thought: If you have RC_PARALLEL_STARTUP="yes" in your /etc/conf.d/rc then you may want to consider changing it to no to see if things get better.

Raydude

----------

## zaphyr

 *Quote:*   

> One last thought: If you have RC_PARALLEL_STARTUP="yes" in your /etc/conf.d/rc then you may want to consider changing it to no to see if things get better. 

 

my RC_PARALELL_STARTUP says "no"

I have added mii and via_rhine to the /etc/modules.autoload.d/kernel-2.6, but that did not help.

I dont think it is module/driver related, seems more to be service related. I suspect that dhcpcd does not start as it should.

Is there any way I can check if it is started? like look at which deamons/services that are running after I log on?

----------

## RayDude

 *zaphyr wrote:*   

>  *Quote:*   One last thought: If you have RC_PARALLEL_STARTUP="yes" in your /etc/conf.d/rc then you may want to consider changing it to no to see if things get better.  
> 
> my RC_PARALELL_STARTUP says "no"
> 
> I have added mii and via_rhine to the /etc/modules.autoload.d/kernel-2.6, but that did not help.
> ...

 

After you log in:

```
ifconfig
```

Which will show you if an IP addy has been assigned. If it hasn't, and dhcpcd eth0 fixes it, then there's a weird problem...

Make sure you don't have some network daemon setup to run at boot, because that will cause networking to try and start too soon.

You can check that by doing this:

```
rc-update -s

               acpid |

           alsasound | boot

              autofs |      default

            bootmisc | boot

             bttrack |

             checkfs | boot

           checkroot | boot

               clock | boot

            coldplug | boot

         consolefont | boot

         crypto-loop |

               cupsd |      default

                dbus |      default

          domainname |      default

              dotnet |

              esound |

                famd |

                 gpm |

                hald |      default

              hdparm | boot

            hostname | boot

             hotplug | boot

             keymaps | boot

                lisa |      default

               local |      default nonetwork

          localmount | boot

       mDNSResponder |

     mit-krb5kadmind |

         mit-krb5kdc |

             modules | boot

            net.eth0 |      default

              net.lo | boot

            netmount |      default

                nifd |

                nscd |

                ntpd |      default

             numlock |

             portmap |      default

             proftpd |

             pwcheck |

             reslisa |

           rmnologin | boot

              rsyncd |

               samba |      default

           saslauthd |

              serial | boot

               slapd |

              slurpd |

               spamd |

           speedfreq |

              splash |      default

                sshd |      default

           syslog-ng |      default

             urandom | boot

          vixie-cron |      default

                 xdm |      default

                 xfs |

              xinetd |      default

              xprint |

              ypbind |      default
```

Obviously net.lo must be at boot, but other network daemons should be set for the default run level.

Raydude

----------

## zaphyr

correct, I do not get an IP at boot, but after runing dhcpcd eth0 I get an IP

I have net.eth0 starting at default and net.lo starting at boot...

this sucks, I have had gentoo running on this box before

I just saw that there is a warning just after entering runlevel 3 during boot:

 *Quote:*   

> Warning: /etc/init.d/serial missing; skipping...

 

is it relevant?

----------

## RayDude

 *zaphyr wrote:*   

> correct, I do not get an IP at boot, but after runing dhcpcd eth0 I get an IP
> 
> I have net.eth0 starting at default and net.lo starting at boot...
> 
> this sucks, I have had gentoo running on this box before
> ...

 

I seem to remember seeing that before. It really doesn't matter if you don't use the serial port (I think its used as a TTY device).

What version of baselayout are you using?

Raydude

----------

## zaphyr

 *Quote:*   

> What version of baselayout are you using?

 

I am using baselayout 1.11.12-r4

----------

## RayDude

 *zaphyr wrote:*   

>  *Quote:*   What version of baselayout are you using? 
> 
> I am using baselayout 1.11.12-r4

 

Well, lets check the obvious things.

Post your /etc/conf.d/net file...

Raydude

----------

## zaphyr

this is my /etc/conf.d/net file

```
config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"
```

----------

## RayDude

 *zaphyr wrote:*   

> this is my /etc/conf.d/net file
> 
> ```
> config_eth0=( "dhcp" )
> 
> ...

 

Where, there you go...

Try this:

```
iface_eth0="dhcp"

dhcpcd_eth0="nodns nontp nonis"
```

I'm not sure what the nodns nontp nonis are for. I have this:

```
dhcpcd_eth0="-Y -h ${HOSTNAME}"
```

They changed the format for net in 1.11, there's a net.example that you can look at in /etc/conf.d

Raydude

----------

## zaphyr

well, I changed it to

```
iface_eth0="dhcp"

dhcpcd_eth0="nodns nontp nonis"
```

but that did not work

then i tried to change it to

```
dhcpcd_eth0="-Y -h ${HOSTNAME}"
```

and that did not work either

then I read the DHCP section in /etc/conf.d/net.example, and changed the setting as described there

```
config_eth0=( "dhcp" )

dhcp_eth0="release nodns nontp nonis"
```

...still no luck....

----------

## RayDude

 *zaphyr wrote:*   

> well, I changed it to
> 
> ```
> iface_eth0="dhcp"
> 
> ...

 

Apparently both syntaxes are supported in /etc/conf.d/net, so I was barking up the wrong tree.

Have you looked at the latest log from /var/log/messages?

And look for error messages in dmesg as well...

Raydude

----------

## zaphyr

hmmm... /var/log/messages has a lot of these msgs

 *Quote:*   

> DHCP_NAK server response received: Duplicate names

 

demesg is ok, no warnings

----------

## RayDude

 *zaphyr wrote:*   

> hmmm... /var/log/messages has a lot of these msgs
> 
>  *Quote:*   DHCP_NAK server response received: Duplicate names 
> 
> demesg is ok, no warnings

 

That's interesting... Do you have any other machines on the network with the same name?

Assuming you don't, then I wonder why the dhcp server isn't noticing that the MAC addy is the same for that machine and not just re-assigning it...

You should see what tail /var/log/messages says after you do the dhcpcd eth0. I'm curious if it produces any warnings or errors.

Raydude

----------

## Slavo

one stupid question when you type as root 

# ifconfig

do you have a loopback device there? (Device lo)

if not then recompile kernel with loopback device support

(this is just guess  :Smile: 

----------

## zaphyr

of course...stupid, stupid, stupid me....

I have two boxes with the same hostname!

I changed the hostname on my new gentoo box and whoopsie, no problems getting an IP anymore!

thanks to all for your time and effort!

 :Very Happy: 

----------

## Joseph_sys

 *zaphyr wrote:*   

> of course...stupid, stupid, stupid me....
> 
> I have two boxes with the same hostname!
> 
> I changed the hostname on my new gentoo box and whoopsie, no problems getting an IP anymore!
> ...

 

I have the same problem and have tried the same entries as you but can not get the eth0 to get an up at boot; it works with "dhcpcd eth0",

my machine has a unique name so the is no reson it shouldn't work.  But it doens't  :Sad: 

----------

## zaphyr

do you get the same warning in /var/log/messages?

----------

## Joseph_sys

 *zaphyr wrote:*   

> do you get the same warning in /var/log/messages?

 

I solve it.

In my case it was file net.eth0; for some reason or another it was very short and didn't contain all the script.  So I had to re-emerge baselayout and follow the instruction on the screen.

----------

## bandreabis

Hi, I'm in trouble, could you please post your net.eth0?

Thanks

Andrea

----------

## Joseph_sys

 *bandreabis wrote:*   

> Hi, I'm in trouble, could you please post your net.eth0?
> 
> Thanks
> 
> Andrea

 

Here mine net.eth0.

Though try to run "emerge baselayout" and it should fix if net.eth0 is broken.

Pay attention to the messages at the end, as it might ask you to run an additional command.

[/code]

 *Quote:*   

> 
> 
> #!/sbin/runscript
> 
> # Copyright (c) 2004-2005 Gentoo Foundation
> ...

 

----------

## bandreabis

Thank you, thank you, thank you!

Now it works! I don't know why, but net.eth0 (which is only a softlink to net.lo) has been cut!

Emerged baselayout, etc-updated net.lo and now network works.

Thank you a lot.

Andrea (Mr.)  :Wink:  [/code]

----------

