# net.eth0 absent.

## Archlungs

Hey all,

I hope you can take the time to try and figure what it is that's confusing the kernel I have; 2.6.20.

Upon starting up, I'm notified that net.eth0 can not be detected - it suggests enabling the modules necessary, which in this case is forcedeth (ethernet works fine when using forcedeth through the live CD).  I also tried downgrading kernels, I went to 2.6.27-r8 although no luck there.  |grep'd it, and everything seems to be in check.  I'm still very new to gentoo and not used to this type of interactivity with code, so please; any advice or suggestions will be much appreciated.

Thanks!

----------

## fangorn

If you built forcedeth as a module ([M] in make menuconfig), you have to load it at startup. Check your /etc/modules-autoload.d/kernel-2.6 if it contains forcedeth and do "modules-update" as root.

If you built forcedeth into the kernel, there is still the possibility that there is another network device getting assigned to net.eth0 (had this problem when enabling ethernet over ieee1394). In this case either identify and remove the blocking driver or change your settings to net.eth1. You can also reassign the network devices using udev to something more speaking like dsl or lan, ... and use this names in /etc/conf.d/net.

----------

## Archlungs

Cheers Fangorn,

I have forcedeth built in - or must have - as it wasn't able to load forcedeth as a module on startup.

Is there some kind of walkthrough on how to untangle devices like that?  I wouldn't really know what to do.

----------

## fangorn

For a starting point there is a Howto "writing udev rules" at gentoo-wiki.com.

----------

## wynn

You can have a look at what you've got by

```
ifconfig -a
```

This should show all ethernet devices whether they have been activated or not.

You can check the drivers they are using by

```
udevinfo -a -p /sys/class/net/eth0 | grep DRIVER
```

Change eth0 as necessary to see them all.

You should now be able to see which one is the forcedeth one.

You can also look through /var/log/messages for "eth0" and "eth1" and it will say which driver is being used and you will be able to see how many ethX's you've got.

----------

## Archlungs

Hey!

Uh, sorry about delay, internet activity severely restricted by a casually vacant eth0.  ifconfig -a showed a blankslate.  Only lo, and even then lo was packing zeros.  udevinfo can't find anything for eth0 - and that's the sum of my ethxs.

Alright, but reading up on udev; it'd seem that's where the problem lies.  Quite difficult to understand, though - this seems advanced.

----------

## wynn

If "ifconfig -a" shows only lo then it looks as though the driver for eth0 hasn't been loaded.

If lo isn't set up as "inet addr:127.0.0.1  Mask:255.0.0.0" then that shows a problem in the init scripts, specifically /etc/init.d/net.lo (net.eth0 is symlinked to net.lo, isn't it?). There should be some messages appearing during boot or in /var/log/messages.

----------

## adrislayer

hi, I have a similar problem...

I have 3 eth interfaces, one with a broadcom 440 fast-ethernet, one with firewire and one with ipw2200.

I have installed ipw2200 as a module and it loads properly the firmware, i've checked in the log messages.

when i do the ifconfig -a I get the following:

 *Quote:*   

> eth0      Link encap:Ethernet  HWaddr 00:C0:9F:76:A0:8D  
> 
>           inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
> 
>           inet6 addr: fe80::2c0:9fff:fe76:a08d/64 Scope:Link
> ...

 

and

 *Quote:*   

> #udevinfo -a -p /sys/class/net/eth0 | grep DRIVER
> 
>     DRIVER==""
> 
>     DRIVERS=="b44"
> ...

 

So i would say, it is a udev problem... but i don't know how to fix it. If someone could help me :p

PS: I have forgot to say that what I don't have is either /etc/init.d/net.eth1 and /etc/init.d/net.eth2

----------

## Archlungs

Hey,

Thanks Wynn; I've found there's no problem with net.lo - and, yeah; net.eth0 is symlinked.  The messages appearing during boot and in /var/log/messages (which are relevant) are just that there is no net.eth0 interface.  I'll copy the error message:

 *Quote:*   

> network interface eth0 does not exist
> 
> please verify hardware or kernel module (drivers).

 

As far as hardware goes, the ethernet is built in (motherboard: GA-M57SLI-S4) and when using the live CD, what I'm told in /var/log/messages is this:

 *Quote:*   

> forcedeth.c: Reverse Engineered nForce ethernet driver.  Version 0.54
> 
> forcedeth: using HIGHDMA
> 
> eth0: forcedeth.c: subsystem (do you need this information?)
> ...

 

This all works and I can ping away leisurely.

I think the greatest problem is that with eth0 being unrecognisable, I'm without a point of comparison.  I have a working ethernet on a virtual environment that is blissfully complacent and it's more or less mocking a corrupt ethernet on my system that just won't budge.  Different worlds, eh.

My friend, who I trust more than  :Wink:  when it comes to gentoo, tutted at my previous kernel menuconfig and then went through and redid it.  It is possible that HIGHDMA, or something, is not loaded in the kernel - and I still have to go and try loading forcedeth as a module on boot - so I have things to experiment with.  OH; hey, just a quick little 'hm' I have;

I'm not able to access /usr/src/linux.  I rm it, then ln -s ~-2.6.20; same thing.  Seems off limits, am I in over my head?

Should I just REINSTALL?  Hahaha.s.ag.asg.ahhhhh...

Oi, adrislayer, give me one of your eths, you have too many - I want one.  One, is all I ask for.  One... a working eth.  A aogk.  I have lost my mind to this.

----------

## Black Zer0

 *Archlungs wrote:*   

> Hey all,
> 
> I hope you can take the time to try and figure what it is that's confusing the kernel I have; 2.6.20.
> 
> Upon starting up, I'm notified that net.eth0 can not be detected - it suggests enabling the modules necessary, which in this case is forcedeth (ethernet works fine when using forcedeth through the live CD).  I also tried downgrading kernels, I went to 2.6.27-r8 although no luck there.  |grep'd it, and everything seems to be in check.  I'm still very new to gentoo and not used to this type of interactivity with code, so please; any advice or suggestions will be much appreciated.
> ...

 

I have the same error.

i tried setting 

```
config_eth0=( "192.168.2.10 netmask 255.255.255.0 brd 192.168.2.255" )

routes_eth0=( "default gw 192.168.2.1" )

# config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"
```

 and 

```
# config_eth0=( "192.168.2.10 netmask 255.255.255.0 brd 192.168.2.255" )

# routes_eth0=( "default gw 192.168.2.1" )

config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"
```

I am currently on the ubuntu livecd(in order to post this) and i did 

```
root@ubuntu:/home/ubuntu# udevinfo -a -p /sys/class/net/eth0 | grep DRIVER

    DRIVER=="8139too"

    DRIVER==""

    DRIVER==""

```

Also, I tried ifconfig -a and only lo showed up

If anyone can help I would also appreciate it.

Is there supposed to be NOTHING in /sys?

I think the adelie Linux (Canada mirror) stage 3 i686 tar ball is incomplete or broken, because I reinstalled Gentoo from the same tar ball and it didn't fix the error sys is still COMPLETELY EMPTY. is there a way to use another tar ball or somehow fill sys without having to reinstall Gentoo AGAIN in the same night   :Crying or Very sad: 

----------

## wynn

 *Archlungs wrote:*   

> I'll copy the error message:
> 
> ```
> network interface eth0 does not exist
> 
> ...

 If you're still having problems (sorry for the delay, I didn't notice your reply   :Sad:  ), could you try

```
modprobe -vv forcedeth
```

this should load the module.

If it doesn't, could you run

```
grep CONFIG_FORCEDETH .config
```

where .config is the config file you have used to compile the kernel you are having problems with (2.6.20-gentoo-rN?). If it yields "# CONFIG_FORCEDETH is not set" then you haven't enabled it. Start menuconfig in the kernel source and navigate to

```
    -> Device Drivers

      -> Network device support

        -> Network device support (NETDEVICES [=y])

          -> Ethernet (10 or 100Mbit)

            -> EISA, VLB, PCI and on board controllers
```

make sure that the last option is enabled otherwise you will not be able to see the selections under it. Then enable

```
< > nForce Ethernet support
```

either compiled in ("y") or as a module ("m"). If it is a module, you should add it to /etc/modules.autoload.d/kernel-2.6

```
echo forcedeth >> /etc/modules.autoload.d/kernel-2.6
```

 *Archlungs wrote:*   

> OH; hey, just a quick little 'hm' I have; I'm not able to access /usr/src/linux.  I rm it, then ln -s ~-2.6.20; same thing.  Seems off limits, am I in over my head?

 Assuming that you went through the normal: mount your root filesystem on /mnt/gentoo, mount your boot partition (if any) on /mnt/gentoo/boot, mount /proc and chroot then, in the chroot'd environment, downloaded and unpacked a stage3 and emerge'd gentoo-sources, you should have a symbolic link /usr/src/linux in /usr/src pointing to the kernel source. If you used the GUI installer from the LiveCD then I don't know what you ended up with   :Smile: 

However, if you don't have

```
$ ls -l /usr/src

lrwxrwxrwx  1 root root   22 2007-03-15 08:33 linux -> linux-2.6.20-gentoo-r3/

drwxr-xr-x 20 wynn wynn 4096 2007-03-15 19:11 linux-2.6.20-gentoo-r3/
```

and perhaps another linux-2.6.xx-gentoo-rN directory (linux-2.6.20-gentoo-r3 may be linux-2.6.20-gentoo depending on the version of gentoo-sources you have) then you can create the symbolic link by

```
cd /usr/src

ln -s linux-2.6.20-gentoo-r3 linux
```

(change (-r3) to whatever you have).

----------

## wynn

 *Black Zer0 wrote:*   

> I have the same error.
> 
> i tried setting 
> 
> ```
> ...

 You probably either don't have the 8139too driver enabled in your kernel or, if you do and it's a module, you don't have it in /etc/modules.autoload.d/kernel-2.6.

Try

```
modprobe -vv 8139too
```

if there is no output then run menuconfig in your kernel source tree, navigate to

```
    -> Device Drivers

      -> Network device support

        -> Network device support (NETDEVICES [=y])

          -> Ethernet (10 or 100Mbit)

            -> EISA, VLB, PCI and on board controllers (NET_PCI [=y])
```

(make sure this last option is enabled or you won't see the dependent options) and enable

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

either as a module ("m") or compiled in ("y"). Note that there are two drivers for the RealTek chip, the other is 8139cp which is enabled by

```
RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)
```

If you make 8139too a module you should add it to /etc/modules.autoload.d/kernel-2.6

```
echo 8139too >> /etc/modules.autoload.d/kernel-2.6
```

 *Black Zer0 wrote:*   

> Is there supposed to be NOTHING in /sys?
> 
> I think the adelie Linux (Canada mirror) stage 3 i686 tar ball is incomplete or broken, because I reinstalled Gentoo from the same tar ball and it didn't fix the error sys is still COMPLETELY EMPTY. is there a way to use another tar ball or somehow fill sys without having to reinstall Gentoo AGAIN in the same night  

 You can try

```
mount -t sysfs sysfs /sys
```

and see if it is still empty.

What kernel are you running? In 2.6.18-gentoo-r5, in menuconfig, you have

```
[*] /proc file system support

[ ]   /proc/kcore support

[*] sysfs file system support

[*] Virtual memory file system support (former shm fs)

[ ] HugeTLB file system support

< > Userspace-driven configuration filesystem (EXPERIMENTAL)
```

under File systems -> Pseudo filesystems. The default setting for sysfs (which should be automatically mounted on /sys) is "y".

In 2.6.20-gentoo-rN the option

```
[*] sysfs file system support
```

has disappeared but is always selected.

From what Documentation/filesystems/sysfs.txt says, sysfs is always there.

----------

## Black Zer0

Does this mean I have to add sysfs to fstab?

What exactly do I put there if so.

And after mounting it sys/ was full of the right stuff

----------

## wynn

 *Black Zer0 wrote:*   

> Does this mean I have to add sysfs to fstab?
> 
> What exactly do I put there if so.
> 
> And after mounting it sys/ was full of the right stuff

 No, at least it's not in fstab here, it gets automatically mounted.

I thought that if the /sys directory existed, it was mounted by the kernel as the kernel uses it to export a number of its data structures. There doesn't seem to be anything in the kernel configuration (that I can see) other than the setting mentioned above which, in the latest kernels, is no longer avaiable to select, it is selected automatically.

If you find, on a reboot, that /sys is empty, could you post your fstab? Methinks a little kernel spelunking might be in order  :Smile: 

 :Idea:  do you have

```
proc            /proc           proc    rw,nosuid,noexec 0 0

tmpfs           /dev/shm        tmpfs   defaults        0 0
```

in your fstab?

----------

## Black Zer0

It worked for a couple of days but it was useless because xorg. It was because temp and proc werent mounted as well as 8139too, the new problem is that 8139too now fails to load and simply says "Failed to load 8139too" if you know why this would've happened, I was reconfiguring the kernel (enabling vm_86 support) but I don't remember disabling anything in menuconfig.

----------

## wynn

You can check your config to see if it is enabled: you can do this for the running kernel by

```
zgrep 8139 /proc/config.gz
```

----------

## Black Zer0

It is enabled as a module at least I think it is because it says CONFIG_8139TOO:m

but for some reason it can't be loaded anymore (I could load it a couple of days ago  :Rolling Eyes:  )

----------

## wynn

You can check to see if it is there with

```
ls -l /lib/modules/$(uname -r)/kernel/drivers/net
```

You should also be able to find it with

```
grep 8139 /lib/modules/$(uname -r)/modules.dep
```

If it isn't there then perhaps the kernel you are running isn't the one for which you compiled this as a module. You can search the other modules.dep for it or you can go back to the source for the running kernel and run "make modules_install". You should be able to see 8139too in the output on the screen.

----------

## Black Zer0

It is there,I did those commands and it showed up, so why isn't it working?

----------

## wynn

When you run

```
modprobe -vv 8139too
```

what does it show? What does "lsmod" show?

----------

## Black Zer0

ismod shows and then it says "fail to insert invalid format"

I also noticed that NO module can autoload if that helps.

----------

## wynn

 *Black Zer0 wrote:*   

> ismod shows and then it says "fail to insert invalid format"
> 
> I also noticed that NO module can autoload if that helps.

 If you look in /var/log/messages, you will see that it has a more informative error message there â see "FATAL: invalid module format" and vermagic.

The problem is that the module was compiled against a version of the running kernel which is not the same as the current running kernel.

As no modules can load it looks as though you need to recompile the kernel and all the modules or check that the version you are booting it, in fact, the latest one compiled.

----------

## Black Zer0

Which Version IS the latest one, I've installed gentoo about 6 times now and havent got any higher than 2.6.19-r7, but someone said they had 2.6.21.

If 21 doesn't exist yet then they had 20.

So I'm supposed to run make && make modules_install right? but where do the newly compiled images go. I remember there being a command to make them show up in /boot or something.

----------

## wynn

 *Black Zer0 wrote:*   

> Which Version IS the latest one, I've installed gentoo about 6 times now and havent got any higher than 2.6.19-r7, but someone said they had 2.6.21.
> 
> If 21 doesn't exist yet then they had 20.

 No, what I meant is the latest bzImage of your running kernel: you can check by comparing the timestamp of the kernel GRUB is booting with the timestamp of arch/i386/boot/bzImage in the kernel's source.

The problem is that the modules in /lib/modules/<release> weren't installed there at the same time as bzImage was copied to make the running kernel image.

 *Black Zer0 wrote:*   

> So I'm supposed to run make && make modules_install right? but where do the newly compiled images go. I remember there being a command to make them show up in /boot or something.

 "make && make modules_install" will save the modules under /lib/modules/<release>/kernel/. There is a "make install" which copies bzImage to /boot together with System.map. It also creates symlinks vmlinuz and System.map in /boot which point to the kernel image and System.map it has just copied in.

----------

## Black Zer0

 *wynn wrote:*   

>  *Black Zer0 wrote:*   Which Version IS the latest one, I've installed gentoo about 6 times now and havent got any higher than 2.6.19-r7, but someone said they had 2.6.21.
> 
> If 21 doesn't exist yet then they had 20. No, what I meant is the latest bzImage of your running kernel: you can check by comparing the timestamp of the kernel GRUB is booting with the timestamp of arch/i386/boot/bzImage in the kernel's source.

 

Ok, but I still want to know how to get a newer kernel version and/or why it would be a good/bad idea

Also I used an i686 tarball so why is the arch folder i386(not because you told me to write i386 but because it actualy exists)

I am very much sick of this error 

```
(chroot) livecd linux # make && make modules_install && make install

scripts/kconfig/conf -s arch/i386/Kconfig

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  CHK     include/linux/compile.h

dnsdomainname: Host name lookup failure

  UPD     include/linux/compile.h

  CC      init/version.o

  LD      init/built-in.o

  GZIP    kernel/config_data.gz

  IKCFG   kernel/config_data.h

  CC      kernel/configs.o

  LD      kernel/built-in.o

  LD      drivers/input/misc/built-in.o

  LD      drivers/input/built-in.o

  CC [M]  drivers/usb/input/hid-core.o

  CC [M]  drivers/usb/input/hiddev.o

  CC [M]  drivers/usb/input/hid-input.o

  LD [M]  drivers/usb/input/usbhid.o

  LD      drivers/built-in.o

  GEN     .version

  CHK     include/linux/compile.h

dnsdomainname: Host name lookup failure

  UPD     include/linux/compile.h

  CC      init/version.o

  LD      init/built-in.o

  LD      vmlinux

  SYSMAP  System.map

  MODPOST vmlinux

  AS      arch/i386/boot/setup.o

  LD      arch/i386/boot/setup

  OBJCOPY arch/i386/boot/compressed/vmlinux.bin

  GZIP    arch/i386/boot/compressed/vmlinux.bin.gz

  LD      arch/i386/boot/compressed/piggy.o

  LD      arch/i386/boot/compressed/vmlinux

  OBJCOPY arch/i386/boot/vmlinux.bin

  BUILD   arch/i386/boot/bzImage

Root device is (3, 3)

Boot sector 512 bytes.

Setup is 7088 bytes.

System is 1778 kB

Kernel: arch/i386/boot/bzImage is ready  (#7)

  Building modules, stage 2.

  MODPOST 468 modules

  CC      drivers/usb/input/usbhid.mod.o

  LD [M]  drivers/usb/input/usbhid.ko

rm: cannot remove `/lib/modules/2.6.19-gentoo-r5/kernel/fs': Function not implemented

rm: cannot remove `/lib/modules/2.6.19-gentoo-r5/kernel/crypto': Function not implemented

rm: cannot remove `/lib/modules/2.6.19-gentoo-r5/kernel/drivers': Function not implemented

rm: cannot remove `/lib/modules/2.6.19-gentoo-r5/kernel/lib': Function not implemented

rm: cannot remove `/lib/modules/2.6.19-gentoo-r5/kernel/arch': Function not implemented

rm: cannot remove `/lib/modules/2.6.19-gentoo-r5/kernel/net': Function not implemented

make: *** [_modinst_] Error 1

```

I got this in my last install and some said that........ *someone wrote:*   

>  *Black Zer0 wrote:*   rm: ... Function not implemented 
> 
> I suspect your toolchain is corrupted 

 

----------

## wynn

 *Black Zer0 wrote:*   

> Ok, but I still want to know how to get a newer kernel version and/or why it would be a good/bad idea

 Nothing wrong with a later version, 2.6.20-r3 is running happily here ... but YMMV   :Smile: 

The latest stable gentoo-sources is 2.6.19-r5, if you want a later one (i.e. an "unstable" one)

```
echo 'gentoo-sources' >> /etc/portage/package.keywords
```

and "emerge gentoo-sources" will install the source of 2.6.20-r3.

You may want to get the symbolic link /usr/src/linux changed whever you emerge a new gentoo-sources

```
echo 'gentoo-sources symlink' >> /etc/portage/packages.use
```

will do this for you.

If you go backwards and forwards between kernel versions, you will then have to check that the symlink is pointing to the source of the kernel you are compiling each time.

 *Black Zer0 wrote:*   

> Also I used an i686 tarball so why is the arch folder i386(not because you told me to write i386 but because it actualy exists)

 This is just the name of the directory under arch. Originally the kernel was for 80386's, then, when the 486 came out, code to run better on that was added. Now, under i386, you have everything from an 80386 to a Pentium 4, including AMDs k6, Duron and Athlon XP, WinChip, VIA Nehemiah and so on.. They are all x86 architecture bundled together under the old name.

 *Black Zer0 wrote:*   

> I am very much sick of this error 
> 
> ```
> (chroot) livecd linux # make && make modules_install && make install
> 
> ...

 Not the toolchain, probably /proc not mounted.

chrooting from Updating KC11 â kernel compiling for the beginner

```
livecd ~ # mount /dev/sda3 /mnt/gentoo

livecd ~ # mount /dev/sda1 /mnt/gentoo/boot

livecd ~ # cd /

livecd / # mount -t proc proc /mnt/gentoo/proc

livecd / # chroot /mnt/gentoo /bin/bash

livecd / # env-update && source /etc/profile
```

Note, you may have to change sda3 and sda1 to suit your layout.

----------

## Black Zer0

oh of course I'm 100% sure I forgot to mount /proc because I am on the livecd because X isnt working--------->Thread:Xorg:noscreens

EDIT: thank you thats one problem solved all I had to do was boot the new kernel and it worked. Now to get X working.(Link above)

This post was not made from the livecd but in links

----------

