# [Solved] eth0 does not exist

## KLIM8D

Hello,

I've just finished the install of gentoo, but after reboot my network device cannot be found.

I configured and compiled the kernel from hardened-sources. When it was done compilling this messages appeared:

"Found 8 modules mismatch(es)"

Is this bad, and could this be the reason it can't find my network device?

I'm installing on a Intel Desktop Board D425KT (Intel Atom), which have this network controller:

Realtek RTL8105E

In the kernel menuconfig, I enabled all Realtek and Intel under "Ethernet device support". 

How ever when I run "make menuconfig" from the same .config file, only Intel (82586/82593/82596) devices are enabled and the list way shorter than before - containing no realtek.

lspci -k from livecd:

```

Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet Controller (rev 05)

Subsystem: Intel Coporation Device d626

Kernel driver in use: r8169

Kernel modules: r8169

```

Last edited by KLIM8D on Fri Sep 21, 2012 3:01 pm; edited 3 times in total

----------

## olek

Sounds to me, as you are working with other kernel sources as you did when you configured it. Do you remember the version?

What do 

```
eselect kernel list
```

 and 

```
ls /usr/src/
```

 say?

----------

## KLIM8D

 *olek wrote:*   

> Sounds to me, as you are working with other kernel sources as you did when you configured it. Do you remember the version?
> 
> What do 
> 
> ```
> ...

 

I backed up my old kernel build and ran emerge hardened-sources afterwards.

eselect kernel list:

 *Quote:*   

> 
> 
> [1] linux-3.4.5-hardened *
> 
> [2] linux-3.4.5-hardened-bak
> ...

 

ls /usr/src/

```

linux

linux-3.4.5-hardened

linux-3.4.5-hardened-bak

```

----------

## oquol

 *KLIM8D wrote:*   

> 
> 
> ```
> Kernel modules: r8169
> 
> ...

 

The right kernel option you need is probably this:

```

Device Drivers  --->

 Network device support  ---> 

  Ethernet driver support  ---> 

   [*]   Realtek devices

   < >     AT-LAN-TEC/RealTek pocket adapter support

   < >     RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EX

   < >     RealTek RTL-8129/8130/8139 PCI Fast Ethernet Adapter supp

   <M>     Realtek 8169 gigabit ethernet support

```

----------

## KLIM8D

 *oquol wrote:*   

>  *KLIM8D wrote:*   
> 
> ```
> Kernel modules: r8169
> 
> ...

 

Does it matter if it's compiled with <M> or <*> ?

I've compiled the kernel using <*> infront of that driver

heres my .config:

http://pastebin.com/ve6VTebK

and full output of lspci -k:

http://pastebin.com/t11aTZAL

----------

## oquol

 *KLIM8D wrote:*   

> 
> 
> Does it matter if it's compiled with <M> or <*> ?
> 
> 

 It doesn't matter. (At least I think so).

What does

```
dmesg | grep r8169
```

say?

----------

## NeddySeagoon

KLIM8D,

It only matters a little if you use <M> or <*>.

<M> means make a loadable module, so the code can be removed from the kernel.  Loadable modules are stored in /lib/modules/`uname -r`/

Most modules are auto loaded but udev or the kernel but not normally network modules, so if you use <M> you may need to name the module in /etc/conf.d/modules so its loaded at boot.

You can load it manually too.

If you use <*> the selected code is built into the kernel binary. Its loaded with the rest of the kernel and cannot be removed from memory. 

There are several advantages to <M>.  You can compile and load a module into the running kernel, no reboot required.

Many modules take module parameters at load time. Sometimes the correct module parameter needs to be determined by trial and error.

Loadable/unloadable modules mean you can try a parameter, if its not right, unload the module and try another one.  

With <*> (built in) code a reboot is required.

Many USB Wifi devices and a few sound cards are like this.

What does 

```
ifconfig -a
```

 show now?

----------

## KLIM8D

I seems like it didn't boot with the right kernel, it used the one from the install media.

How ever, new problem. I'm not able to boot - my system now gets kernel panic at boot. 

Here's some pictures of the screen:

http://imageshack.us/g/443/img20120921012642.jpg/

----------

## supperskidvn

The drivers for your Network card are either:

- Not installed

- Failed at start up

- Not configured correctly.

If you include the Make/Model/version of your network card we can start helping from there.

In linux device names are assigned to hardware devices. In this case: eth0 corresponds to an ethernet card.

In a terminal (console) type the following and paste the result along with your card information:

Code:

 *Quote:*   

> dmesg | grep eth0

 

Oh, and as a second opinion. Although some people may say that Gentoo is 'newbie friendly' my personal opinion is that you already need some background to play with it.

I would highly recommend starting with a different distribution and then, play with Gentoo.

I like Gentoo, I've installed and used Gentoo, I like the concept, I think that you can learn a lot. I just think that you can get the most of Gentoo after you have used another distribution.

Why? 

- Well, Some parts of the installation steps just say 'Include the required drivers' (For example, network card drivers). If you haven't installed another distribution, you may note even know that you need a driver. This is not a criticism of the installation documents, they are awsome, just the nature of the problem.

- During the Gentoo installation you have many options and that's great. Except that you need to know what the options are before deciding.

- The most talked about advantage of Gentoo is the ability to optimize to your own needs. Well, you need to know what you are doing to take full advantage of this 'feature', If you just do a level three and don't play with the optimizations, then Why do you want Gentoo? (Actually the install documentation asks this same question)

- As a 'first experience' new users may get the idea that installing linux is always very labour intensive. Well, Some distributions are as easy as popping in a CD, configuring two or three things and you are on your way in 15 minutes. (For example, puppy linux)

So, I see that you've come a long way installing Gentoo. Congratulations! It's been fun eh?

So, send us that info about your card and we'll help you the next mile.

----------

## wcg

Note: booting what you suspect is the wrong kernel would be a

"/boot/grub/grub.conf" problem. (That is where you list kernels

to be displayed as boot options in the grub boot menu.)

grub.conf syntax and logic is a whole subject of its own.

If the Gentoo manual is not enough:

http://www.troubleshooters.com/linux/grub/index.htm

There is a sea change in progress from grub-1.x to grub-2.x

in the upstream grub project. Grub-1.x, also known as "grub-static"

in Gentoo Portage, is still the stable grub bootloader in Gentoo,

but many systems are now using grub-2.x for a variety of reasons.

There are differences in syntax, etc.

(Some of the reasons for moving to grub-2.x are GPT, a new partition

table format that can accomodate large disks and has other

advantages over DOS MBR format, and EFI system

initialization:

http://rodsbooks.com/gdisk/booting.html

http://www.rodsbooks.com/efi-bootloaders/index.html

http://rodsbooks.com/gdisk/bios.html

)

You probably do not need to make this change from grub-1.x to

grub-2.x simply to boot kernels in your new Gentoo system, but if

the online grub documentation seems to be talking about two

different programs at times, this may be why. You need to know

whether it is grub-1.x or grub-2.x that a page is referring to.

----------

## KLIM8D

 *wcg wrote:*   

> Note: booting what you suspect is the wrong kernel would be a
> 
> "/boot/grub/grub.conf" problem. (That is where you list kernels
> 
> to be displayed as boot options in the grub boot menu.)
> ...

 

What was causing the system to boot the wrong kernel, was I used the syslinux from my USB install media and not the new installed bootloader, When the system booted, my booted kernel was of version 3.2.12 which is not the version I compiled (3.4.5)

It's booting the right kernel now, and using Lilo as bootloader. Now I'm struggling with the kernel panic as the pictures show above

----------

## KLIM8D

Great, it's solved now. I found this post: http://askubuntu.com/questions/71332/kernel-panics-with-cannot-open-root-device-error-where-do-i-append-the-root

Where the guy had the same error messages as I did. Followed some of the suggestions and compiled my kernel with all ext3 + ext4 options and nvidia-sat, and some more. Finally I can get started setting up my system  :Smile: 

----------

## wcg

So, grub issues are not relevant to this system, and you probably know

lilo's config file from use with another Linux distribution. Your error log

shows that the kernel is possibly not finding the root partition. In grub.conf,

it is specified as "root=/dev/[partition on a device]" as part of the

"kernel" command.

Perhaps you need lilo to pass the same information to the kernel,

with an "append=" within the "image=" sections for the different kernels.

```

man lilo.conf

```

You might be able to run that logging in from the install cd and

chrooting. If not, the man page for lilo.conf can be found online:

http://netadmintools.com/html/5lilo.conf.man.html

(Scroll down to "Kernel Options".)

----------

## KLIM8D

 *wcg wrote:*   

> So, grub issues are not relevant to this system, and you probably know
> 
> lilo's config file from use with another Linux distribution. Your error log
> 
> shows that the kernel is possibly not finding the root partition. In grub.conf,
> ...

 

Yes I've been using ArchLinux for some years now, so I'm not completely now to Linux. How ever it's one of the first times I compile my own kernel, and wanted it to get as minimal as possible for my server. 

As my post above says, the problem is solved now. It was some kernel modules that wasn't enabled and therefore the system couldn't understand my filesystem or partition scheme or what ever. Well I enabled some sata modules and a few ext4 modules aswell and everything runs perfect now  :Smile: 

----------

