# New to Gentoo: can't get Ethernet to work [solved]

## Mardok45

Hi, I just installed Gentoo on my machine.  It's up and running on a terminal and almost ready for a desktop environment, but the Ethernet connection doesn't work.

When Gentoo boots, this is output to the screen:

* Starting eth0

*   dhcp

*   No DHCP client installed

When Gentoo booted from the livecd, the internet connection worked fine.  Was able to download the kernel and everything.

I don't know what to do from here because all the previous flavors of Linux handled the internet connection for me (but I am prepared for head-meets-keyboard frustration, and surprised Gentoo's up and running after only 5 hours of work).

Can someone help me get my Ethernet connection running?

----------

## mjf55

Welcome to Gentoo.  You did a great job on getting running on the first try.  As far as a DHCP client, emerge net-misc/dhcp.  This will provide you the client you need.

----------

## Mardok45

emerge net-misc/dhcp tried to download the drivers, which is not an option  :Very Happy: 

So I booted from the cd, and ran these commands:

```

# mount /dev/hda2 /mnt/gentoo (mounted the root partition)

# chroot /mnt/gentoo /bin/bash

# env-update

>> Regenerating /etc/ld.so.cache...

# source /etc/profile

# export PS1="(chroot) $PS1"

```

emerge was able to download the dhcp package, but it returned this error:

ERROR: net-misc/dhcp-3.1.0 failed

Call stack: [ebuild.sh, line 49: Called src_compile] and [environment, line 2478: Called die]

The specific snippet of code: [emake || die "compile problem"]

The die message: [compile problem]

----------

## zyko

Did you mount proc? Some packages don't emerge without /proc:

```
mount -t proc none /mnt/gentoo/proc
```

By the way, according the the handbook (modular networking/DHCP) gentoo's default DHCP client is dhcpcd.Last edited by zyko on Sat Jun 21, 2008 4:15 am; edited 1 time in total

----------

## sonicbhoc

to prevent that in the future, use emerge -f and just download the package. Reboot into your system and then emerge the package normally.

----------

## Mardok45

Okay, I repeated the same steps from before, only this time I mounted proc.

Then I ran emerge -f  net-misc/dhcpcd and booted back into Gentoo on my hard drive.

Ran emerge net-misc/dhcpcd and it returned an error with no error message   :Sad: 

```

...

ERROR: net-misc/dhcpcd-3.2.3 failed.

Call stack: [ebuild.sh, line 49: Called src_compile] and [environment, line 749: Called die]

The specific snippet of code: emake CC="$(tc-getCC)" INFODIR=/var/lib/dhcpcd || die

The die message: (no error message)

...

```

src_compile seems to be the source of what's causing these errors... maybe I did something wrong when following the manual.

----------

## geforce

emake seems to cause the error

----------

## NeddySeagoon

Mardok45,

Part of the error message will have been "A complete build log is located at /var/...."

Please post that log file. It will contian the first error, which is what we need to see.

What you have posted is portages tidying up messages.

----------

## Mardok45

There's two error messages, I don't think the first error is causing the second:

error: bad value (core2) for -march= switch

error: bad value (core2) for -mtune= switch

I downloaded the amd64 version of the kernel, and my processor is a Core 2 Duo E4400.

----------

## purak

 *Mardok45 wrote:*   

> There's two error messages, I don't think the first error is causing the second:
> 
> error: bad value (core2) for -march= switch
> 
> error: bad value (core2) for -mtune= switch
> ...

 

 :Confused: 

Downloaded the amd64 ?  Did you compile own kernel? Do you use genkernel script?  You must add this lines in make.conf You want to install Gentoo on your harddisk don't you?   :Confused: 

32 bit profile (x86)

```
CHOST="i686-pc-linux-gnu"

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"
```

64 bit profile (amd64)

```
CHOST="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe"

CXXFLAGS="${CFLAGS}"

```

----------

## Mardok45

```

CFLAGS="-march=nocona -O2 -pipe"

CXXFLAGS="${CFLAGS}"

```

Changing those two flags in /etc/make.conf solved the problem.

Thanks for the help everyone.

----------

