# Fresh Gentoo - no dhcpd client installed?

## grupp2

Hello folks!

Me and a couple of friends just manage to get Gentoo to work. But it seems like our network access via dhcp doesn't work. We did run "emerge dhcpd" etc. when installing Gentoo. But now when we boot, it says "no dhcpd client installed".

How can we install it? USB?

Help us!

Yours,

Grupp2

----------

## Januszzz

If you did emerge dhcpcd while installing than you've got the client. But your starting scripts says you got no dhcp client.

One of the above is wrong.

I would login to the Gentoo and setup the network manually. Test if you have dhcp client all right using command line (i.e. dhcpcd eth0). If not, emerge dhcpcd again.

If you've got no idea how to configure the network manually, then just test what files are required to download (emerge dhcpcd -pv, emerge dhcpcd, let it fail on download). Write down the names of the files, take them from a mirror on another machine, and copy later with USB to /usr/portage/distfiles.

Emerge is a wrapper to fetching, configuring and compiling. If one activity fails, use your imagination and substitute the action manually.Last edited by Januszzz on Wed Dec 15, 2010 1:31 pm; edited 1 time in total

----------

## grupp2

/sbin/dhcp doesn't exist.. just noticed the sticky thread.. Will read in it.

----------

## Januszzz

ouch, little fail, as I've messed the things:

query belongs dhcpcd  

[ Searching for file(s) dhcpcd in *... ]

net-misc/dhcpcd-4.0.15 (/lib/dhcpcd)

net-misc/dhcpcd-4.0.15 (/var/lib/dhcpcd)

net-misc/dhcpcd-4.0.15 (/sbin/dhcpcd)

equery belongs dhclient

[ Searching for file(s) dhclient in *... ]

app-shells/bash-completion-1.2 (/usr/share/bash-completion/dhclient)

net-misc/dhcp-3.1.2_p1 (/sbin/dhclient)

net-misc/dhcp-3.1.2_p1 (/var/lib/dhclient)

So dhcpcd is separated client, while dhclient is part of ISC implementation. Both will work (dhclient eth, dhcpcd eth0)

Regards.

----------

## grupp2

I tried to use default settings in /etc/conf.d/net

and now it says "ERROR: cannot start netmount as net.eth0 could not start"

I am not experienced with Gentoo, so please be gentle   :Laughing:  .

----------

## Januszzz

 *Quote:*   

> I tried to use default settings in /etc/conf.d/net
> 
> and now it says "ERROR: cannot start netmount as net.eth0 could not start" 

 

This is very common. There are dependencies between services so all you need to do is start net.eth0 instead of trying netmount previously. Basic commands are here in manual:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1

----------

## grupp2

 *Januszzz wrote:*   

>  *Quote:*   I tried to use default settings in /etc/conf.d/net
> 
> and now it says "ERROR: cannot start netmount as net.eth0 could not start"  
> 
> This is very common. There are dependencies between services so all you need to do is start net.eth0 instead of trying netmount previously. Basic commands are here in manual:
> ...

 

Doesn't help.. When I run "/etc/init.d/net.eth0 start" it says "No DHCP client installed".

EDIT: I use WMvare, if it's helpful.

EDIT2: I've DLed "dhcpcd-5.2.8.ebuild" and copied it to my usb. How do I mount it? "mount -t /dev/.."

EDIT3: I've accomplished to mount the usb and I copied the dhcpcd-5.2.8 to /usr/portage/distfiles. What now   :Embarassed:  ?

Thanks in advance!

----------

## Ph0eniX

What's the output of:

```

ifconfig -a

```

----------

## grupp2

 *Ph0eniX wrote:*   

> What's the output of:
> 
> ```
> 
> ifconfig -a
> ...

 

http://homepage.lnu.se/student/sb222ck/img/ifconfig-a.jpg

----------

## Januszzz

 *Quote:*   

> EDIT2: I've DLed "dhcpcd-5.2.8.ebuild" and copied it to my usb. How do I mount it? "mount -t /dev/.." 

 

That's great, but not exactly what you was supposed to do. Ebuild is just a script to download, configure and install software, thus it needs network to operate.

You should download the software named dhcpcd; you can use one of Gentoo mirrors of course. For example this one: http://gentoo.po.opole.pl/distfiles/dhcpcd-4.0.15.tar.bz2. Copy it to /usr/portage/distfiles/ and try again:

emerge dhcpcd

If it fails again, it may be lack of another component (I do not have very clean system now so I'm not sure). If it succeed, you're done (/etc/init.d/net.eth0 restart should go fine).

----------

## Jaglover

 *grupp2 wrote:*   

>  *Ph0eniX wrote:*   What's the output of:
> 
> ```
> 
> ifconfig -a
> ...

 

You do not need to fiddle with USB stick, just use ifconfig to assign an IP address to your interface and route utility to set default gateway.

----------

## Januszzz

 *Quote:*   

> ou do not need to fiddle with USB stick, just use ifconfig to assign an IP address to your interface and route utility to set default gateway.

 

of course he can use ifconfig as well as usual manual section dedicated to network configuration... as long as he knows the network he is on and the gateway he has to routee to  :Smile:  if no dhcp client handy (any other OS) it can be difficult to determine address class/ip.

----------

## forkbomb

 *Januszzz wrote:*   

> of course he can use ifconfig as well as usual manual section dedicated to network configuration... as long as he knows the network he is on and the gateway he has to routee to  if no dhcp client handy (any other OS) it can be difficult to determine address class/ip.

 Perhaps... but these days guessing you're on 192.168.1.0/24 or 192.168.0.0/24 is a reasonable stab in the dark.

Or if you've got wireshark installed start up a capture and wait for an ARP broadcast to come in.

Or just grab the distfile as advised.

----------

## zeek

 *grupp2 wrote:*   

> We did run "emerge dhcpd"

 

dhcpd and dhcpcd are different things ...

----------

## Januszzz

 *Quote:*   

> Perhaps... but these days guessing you're on 192.168.1.0/24 or 192.168.0.0/24 is a reasonable stab in the dark. 
> 
>  Or if you've got wireshark installed start up a capture and wait for an ARP broadcast to come in. 

 

Hey, the guy is on his knees, he won't install wireshark without the dhcp client... he'i just installing the system...

----------

## pigeon768

Easiest way is to set the network up manually, then use emerge to install dhcpcd. 

```
ifconfig eth0 up

ifconfig eth0 192.168.1.2

route add default gw 192.168.1.1

echo nameserver 8.8.8.8 > /etc/resolv.conf

emerge dhcpcd
```

 Substitute 192.168.1.2 for the IP you want to give your system, and 192.168.1.1 for the IP of your gateway, which is probably your router. You'll want to make sure the first three numbers of both IPs are the same - so if your router is 192.168.0.1 you'll use 192.168.0.something instead. The last digit doesn't matter, it just has to be something that isn't used by a different system on your local network.

----------

## pappy_mcfae

From the Gentoo Handbook, x86 section 9e "If you require Gentoo to automatically obtain an IP address for your network interface(s), you need to install dhcpcd (or any other DHCP client -- see Modular Networking for a list of available DHCP clients). If you don't do this now, you might not be able to connect to the internet after the installation."

It pays to read the docs.

Cheers,

Pappy

----------

## chithanh

Actually, the stage3 comes with a dhcp client (busybox udhcpc) by default. It is just that the init scripts cannot use it due to bug 205286.

----------

## pappy_mcfae

Even though I use static IP, I always install dhcpcd. I just do it as a matter of course. This machine sometimes gets out in the real world, so it needs to be able to use DHCP at times. Why not be prepared? Besides, the handbook says it's a good idea.

Cheers,

Pappy

----------

