# [SOLVED] dhcpcd: eth0: interface not found or invalid

## LoTeK

hi,

after installing gentoo on my T420s (with manual kernel configuration) i cant get my network working. i tried to configure the network-kernel-section the same as with genkernel (on my desktop system with a working network) but ethernet still doesnt work.

output of lspci | grep -i network:

```
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)

03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)

```

output of cat /usr/src/linux/.config:

http://bpaste.net/show/45492

i also followed the link from this thread:

https://forums.gentoo.org/viewtopic-t-889390-start-0.html

but when i tried installing net-misc/networkmanager (which is very huge btw, why?) i get the following error message:

output of /var/log/portage/elog/summary.log:

http://bpaste.net/show/45494Last edited by LoTeK on Fri Sep 14, 2012 10:21 pm; edited 1 time in total

----------

## NeddySeagoon

LoTeK,

```
# CONFIG_E1000E is not set
```

That will be your kernel missing your ethernet card driver.

You may as well make it <*>.

One problem at a time.

----------

## LoTeK

thanks for the reply..

i've enabled it, but i still get the error: eth0: interface not found or invalid

output of the new /usr/src/linux/.config:

http://bpaste.net/show/45513

 *Quote:*   

> One problem at a time.

 

sorry, but i thought its important for my first problem!   :Smile: 

----------

## NeddySeagoon

LoTeK,

That looks good.  Lets do a few more tests.

What does 

```
uname -a
```

 show?

The data and time are the date/time that the running kernel was made.  Does it look correct or are you maybe not running the kernel that belongs to taht config file?

What does 

```
ifconfig -a
```

 show?

Do you have any interface names of the format ethX where X is a number?

Thats your network card as seen by the kernel.  It should be eth0 but it need not be.

Do you have the corresponding /etc/init.d/net.ethX file as a symbolic link to net.lo ?

This is the script needed to start ethX if you can see it in ifconfig -a.

What does

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

do ?

When the other steps above produce the desired results, it should make your network work.

Stop at the first problem and post back.  Keep the other steps in mind, you will get to the end, so you will come back to them.

NetworkManager needs a network to manage. It will not work until you can start the network manually.

Its best to make your Gentoo work first then build on what works.  This keeps the problem space small - you broke it with your last change. It also means you can back out a change quickly to get back to a working system.

----------

## LoTeK

output of uname -a:

```
Linux M2-01 3.4.9-gentoo #1 SMP Fri Sep 14 16:42:40 CEST 2012 x86_64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz GenuineIntel GNU/Linux
```

I think this could be my old kernel, but unfortunately I don't remember the exact time when I've compiled the old and the new kernel and the time 16:42 isn't my localtime (I wasn't at my computer at this time)

----------

## NeddySeagoon

LoTeK,

```
3.4.9-gentoo #1
```

the #1 means the first build of this kernel version but lets do the kerne time chck another way.

using ls -l, look at the timestamps on the following files.

```
/usr/src/linux/.config
```

this shuld be the oldest file as the kernel is made by reading this file.

```
/usr/src/linux/arch/x86/boot/bzImage
```

this is the kernel file as built.  It must be newer than the .config or the .config has been changed since the kernel was made.

```
/boot/<kernel>
```

this is a copy of bzImage and should have the same timestsmp.

Did you mount /boot before you installed the kernel?

Which kernel does 

```
readlink /usr/src/linux
```

 point to?

3.4.9-gentoo would be good, from your uname -a

----------

## LoTeK

ok, I've found my noob-error:   :Smile: 

after 

```
cp arch/x86_64/boot/bzImage /boot/kernel-3.4.9-gentoo
```

my network works correct!

now I have to set up my wireless-network  :Sad: 

thanks for your help!!

----------

## LoTeK

sorry, I didn't see your last post. After 

```
cp arch/x86_64/boot/bzImage /boot/kernel-3.4.9-gentoo
```

my uname -a looks as follows:

```
Linux M2-01 3.4.9-gentoo #3 SMP Fri Sep 14 20:57:50 CEST 2012 x86_64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz GenuineIntel GNU/Linux
```

ls -l  /usr/src/linux/.config:

```
-rw-r--r-- 1 root root 86919 Sep 14 20:56 /usr/src/linux/.config
```

ls -l /usr/src/linux/arch/x86_64/boot/bzImage:

```
lrwxrwxrwx 1 root root 22 Sep 14 20:57 /usr/src/linux/arch/x86_64/boot/bzImage -> ../../x86/boot/bzImage
```

which is correct!

ls -l /boot/kernel-3.4.9-gentoo:

```
-rw-r--r-- 1 root root 5224032 Sep 15 00:16 /boot/kernel-3.4.9-gentoo
```

this has not the same timestsmp! is this a problem?

readlink /usr/src/linux:

```
linux-3.4.9-gentoo
```

----------

## NeddySeagoon

LoTeK

```
lrwxrwxrwx 1 root root 22 Sep 14 20:57 /usr/src/linux/arch/x86_64/boot/bzImage -> ../../x86/boot/bzImage
```

is a symbolic link.  It timestamp is not useful.

A long time ago the 32bit and 64 bit kernel sources were merged and a new arch of x86 was created. 

The x86_64 and i386 arches became symlinks to x86.  You need to look at the file pointed to by the symlink, not the symlink itself.

Notice my post used .../arch/x86/...

Also your previous post showed 3.4.9-gentoo #1 now you have 3.4.9-gentoo #3, which is build three of your 3.4.9-gentoo kernel.

I think you will find all is well, since it works.

----------

## LoTeK

 *Quote:*   

> A long time ago the 32bit and 64 bit kernel sources were merged and a new arch of x86 was created.
> 
> The x86_64 and i386 arches became symlinks to x86.

 

ok, I didn't know that.

 *Quote:*   

> Notice my post used .../arch/x86/... 

 

yes, I thought it was a typo    :Smile: 

the timestamp from /usr/src/linux/arch/x86/boot/bzImage is still 20:57, but ok, it works!!

----------

## NeddySeagoon

LoTeK,

Your config is timed at  Sep 14 20:56 and your bzImage at  Sep 14 20:57.

Its unlikely you could build your kernel in 60 seconds ... dis you look at and save menuconfig while the kernel was building?

Your kernel in boot is later - times are not preserved on copies on all filesystems so later is OK, and we know that you didn't do the copy as soon as the kernel was built as 

a) you posted that it still didtn't work

b) you posted that you copied the kernel to boot after that.

----------

## LoTeK

No, I just did:

```
make menuconfig
```

and after configuring:

```
make && make modules_install
```

according to the Handbook.

The compile time was short, but I don't know if it was only 60 seconds

----------

## NeddySeagoon

LoTeK,

Your compile time should be shourt as you oly changed a singkle setting and your kernel had been built before.

This is becase make is lazy.  It visits all of the directories in the kernel tree and looks at the date stamp on any existing *.o files and compare that to the *.c and *.h files the *.o depends on.

If te *.o is newer, there is no need to build the *.o again, so the build is skipped and the old file used.

make will only have built your new e1000e code.

Think carefully about make being lazy.  What would happen if the clcok was moved back for some reason, you changed one of the *.c files then ran make?

----------

## LoTeK

 *Quote:*   

> Think carefully about make being lazy. What would happen if the clcok was moved back for some reason, you changed one of the *.c files then ran make?

 

then the *.o file wouldn't be build again, because it is "older" than the *.o file. 

But then it is possible that the kernel is built in 60 seconds, when I changed only the e1000e code?! Do such "clock errors" happen often? is there an alternative to make?

I thought that with every change the whole kernel is recompiled and that only with c++ one can link objectcode...

----------

## NeddySeagoon

LoTeK,

Correct!

There are several alternalves to make but they all work the same way.

You can run 

```
make clean
```

 in the kernel tree to remove all of the *.o files if you have any doubts.  You will usually see Clock Skew Detected warnings on boot too.

Such incidents are rare, as most network connected PCs run ntp-client and ntpd to get the time from the internet and keep it synchronised.

Incidents such as flat CMOS batteries, when time is set to 1 Jan 1970 are picked up as warnings along the lines of output file older than source file by tar.

The most common cause is users putting the clock right after an install.  Then the problem persistes for 24 hours or less.  

Its not so important that time is right - as long as there are no backward steps.

----------

