# DHCPCD wont work on startup[SOLVED]

## Toraux

I set up my /etc/conf.d/net as they said you should in the installation handbook and it wont work on startup.  However when I manually type:

dhcpcd eth1

then I can get on the net.  Anyone think they can help me?

Thanks in advance.

-TorauxLast edited by Toraux on Sun Dec 25, 2005 3:29 pm; edited 1 time in total

----------

## desultory

Did you create /etc/init.d/net.eth1 and set it as a boot service?

If so what error does it give at boot time?Last edited by desultory on Fri Dec 23, 2005 4:10 am; edited 1 time in total

----------

## Toraux

Running dhcpcd ...                          [ !! ]

/etc/init.d/net.eth1 is created and was added to boot using rc-update add net.eth1 default

----------

## desultory

Try:

```
rc-update del net.eth1 default

rc-update add net.eth1 boot
```

Sometimes that will work where default does not.

----------

## Toraux

Same problem, might help to know that running /etc/init.d/net.eth1 start has the same end result.

----------

## magic919

/etc/conf.d/net can be empty with the current baselayout if you want to get IP by DHCP.  

 *Quote:*   

> cat /etc/conf.d/net
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

Do this and then remake the symlink from net.eth1 to net.lo.

Also would be worth checking your logs.

----------

## Toraux

Just tried that... ln -s net.lo net.eth1 is the command to create the symbolic link you asked for ?  If that is the case its still not working, what should I look for in my logs in particular?

----------

## magic919

Provided you are in /etc/init.d, then yes.  Do ls -l there to be sure.

You are looking for more details of the error when dhcpcd fails at boot.

----------

## Dan Forever

I have the exact same problem with eth0

```
/etc/init.d/net.eth0 start

* starting eth0

*   bringing up eth0

*      dhcp

*         Running dhcpcd...       [!!]
```

However, manual activation works:

```
ifconfig eth0 up

dhcpcd eth0
```

It's an intel pro 100+

It's loaded as a module with "e100" in /etc/modules.autoload.d/kernel-2.6

I don't know what is broken about net.eth0  :Sad: 

----------

## feardapenguin

Check to make sure you don't have bash version 3.1 (or higher).  It has a problem with init scripts.  net is one of the casualties.  bash-3.0-r14 works fine.

----------

## fserafin

i had the same problem just used dhcp instead of dhcpcd

----------

## Toraux

```

# bash --version

GNU bash, version 3.00.16(1)-release (i686-pc-linux-gnu)

Copyright (C) 2004 Free Software Foundation, Inc.

```

Don't think bash is the problem.

----------

## bart_joosten

 *Dan Forever wrote:*   

> I have the exact same problem with eth0
> 
> ```
> /etc/init.d/net.eth0 start
> 
> ...

 

Well Dan, I've exactly the same problem and can't figure it out myself, yes yes yes, I'm a noob, I know, first time installing gentoo on my voodoo machine  :Wink: .

But yeah, automaticly loading doesn't work and manually everything works fine...

Strange for me, easy for a guru :p

----------

## Dan Forever

I figured out my problem! It's due to one of two things. Either the 0 I had set to override in /etc/conf.d/domainname or the space in the hostname at /etc/conf.d/hostname. I know, naughty of me for doing both. I suspect it's more likely to be the space being the culprit though.

----------

## Toraux

name was what was the problem for me, feel like an idiot now.

----------

## Dan Forever

Dude! Stick [SOLVED] in the topic name so it can help others!  :Wink: 

----------

## bart_joosten

Dan thank you forever ....

I feel like   :Embarassed:   :Embarassed:   :Embarassed:   :Embarassed:   :Embarassed:   :Embarassed: 

Had a space in my hostname too....

----------

## Nick W

I've been on this for 2 sodding days now, and again it was a space in the hostname!

Thankyou!

Might i suggest this be made sticky?

----------

