# No more eth0 after install(not like post 725828) [SOLVED]

## jody

Hi

(i posted this before in https://forums.gentoo.org/viewtopic-t-725828.html but

i probably didn't get any reply, because it was already marked as solved)

I have compiled the amd64 kernel 2.6.27-r7,

and now i have no more eth0.

On my old kernel (2.6.24-r7) lspci said

```
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)
```

and dmesg said

```
eth0: Tigon3 [partno(BCM95751) rev 4001 PHY(5750)] (PCI Express) 10/100/1000Base-T Ethernet 00:e0:81:54:00:8a

eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1]

eth0: dma_rwctrl[76180000] dma_mask[64-bit]

tg3: eth0: Link is up at 1000 Mbps, full duplex.

tg3: eth0: Flow control is on for TX and on for RX.

```

so i selected both

```
--- Network device support 

  --- Ethernet (1000 Mbit)

    <*>   Broadcom Tigon3 support

   <*>   Broadcom NetXtremeII support
```

in the menuconfig, and rebuilt the kernel with this.

But i still don't have an eth0. Ifconfig only shows the lo entry.

I tried all suggestions from the other post:

rc-update shows that net.eth0 gets started at boot time,

and i *do* have a 70-persistent-net.rules:

```
# This file was automatically generated by the /lib64/udev/write_net_rules

# program run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x14e4:0x1677 (tg3)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:81:54:00:8a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
```

but still, during boot i get the message

Code:

Starting eth0

  Bringing up eth0

  130.60xxx.xxx

  network interface eth0 does not exist.

  Please verify hardware or kernel module

Now, i'm sure it's not a hardware problem, since it works when i boot with the 24 kernel.

How do i "verify" the kernel module?

in the 27 kernel i have

```
localhost ~ # dmesg | grep -i eth

Driver 'sd' needs updating - please use bus_type methods

Driver 'sr' needs updating - please use bus_type methods
```

 and 

```
lspci | grep -i eth

 01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)
```

I'm thankful for any helpful hints.

JodyLast edited by jody on Thu Jan 15, 2009 4:20 pm; edited 1 time in total

----------

## devilheart

does 

```
ifconfig eth0
```

output anything?

----------

## jody

'ifconfig eth0' says

```
eth0: error fetching interface information: Device not found
```

and 'ifconfig' only talks about lo:

```
lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:8 errors:0 dropped:0 overruns:0 frame:0

          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
```

However what i noticed is that when i boot the 2.6.24 kernel,

'lsmod' has more than a hundreds entries, one of them being 'tg3' which

is with high probability the driver for my network card (Tigon3).

When i boot the 22.6.27 kernel 'lsmod' only shows

```
Module                  Size  Used by

ipv6                  201640  20 

usbcore                98448  1 

```

I then tried to do 'modprobe tg3' which was answered with 

```
FATAL: Module tg3 not found.
```

.

So i found the tg3.ko doesn't exist in /lib64/modules/2.6.27-gento-r7.

But, as noted in my previous post,above i explicitly specified tg3 in the menuconfig.

```
 localhost ~ # grep TIGON /usr/src/linux-2.6.27-gentoo-r7/.config

 # CONFIG_ACENIC_OMIT_TIGON_I is not set

 CONFIG_TIGON3=y
```

and

```
localhost ~ # ls -l /usr/src/

total 4

lrwxrwxrwx  1 root root   22 Jan  7 18:32 linux -> linux-2.6.27-gentoo-r7

drwxr-xr-x 23 root root 4096 Jan 14 14:41 linux-2.6.27-gentoo-r7
```

So this raises some questions: 

*why do i have only two instead of more than hundred when i do lsmod in my 27 kernel?

*how do i get a normal state of affairs there?

*why wasn't the tg3.ko created even though i specified it?

On a related note: on the same system i tried to install the nvidia driver.

I did 'moprobe nvidia', and a subsequent lsmod indeed showed nvidia.

But after rebooting, it was gone. How do i get modprobed modules to stick?

Thank You

  Jody

----------

## Inodoro_Pereyra

lsmod will only show the stuff that you compiled as module: <M>.

Your ethernet driver is compiled static: <*>

Try this:

```
ifconfig eth0 up
```

If after that ifconfig shows the interface, just create a symlink for eth0, remove any persistent udev rule an add eth0 as service:

```
ln -s /etc/init.d/net.lo /etc/init.d/net.eth0

rm /etc/udev/rules.d/70-persistent-net.rules

udevadmn trigger net

rc-update add net.eth0 default

/etc/init.d/net.eth0 restart
```

Hope it helps.

Cheers!

**EDIT** /etc/modules.autoload.d/kernel-2.6 is a plain text file where you can put any module if it needs to be loaded at startup and it doesnt do automagically by default.

----------

## devilheart

also remeber that ifconfig shows only upped interfaces. you need to use ifconfig -a to see all interfaces

----------

## jody

Hi inodoro_Pereya

Thank You for your suggestion. Unfortunately it didn't work:

```
localhost ~ # ifconfig eth0 up

eth0: ERROR while getting interface flags: No such device
```

So you don't think i need tg3.ko?

@devilhart: 'ifconfig -a' only shows the lo interface...

Thank you

  Jody

----------

## devilheart

you can try with the official driver from broadcom

http://www.broadcom.com/support/ethernet_nic/netxtreme_desktop.php

EDIT:

WAIT! before anything else, are you sure you haven't disabled the NIC from bios?

also remove any custom udev rule for that NIC

the NIC must work with tg3 driver

----------

## jody

Im quite sure that the NIC is not disabled.

WHen i reboot and saelect the 2.6.24 kernel in the grub menu,

i get a working eth0.

Assuming i would get the official driver, where would i have to put it?

In the download there is a zipped rpm - how would i turn that into .ko?

Thanks

  Jody

----------

## devilheart

you can use rpm2targz to convert the rpm file into a more manageable format

on 2.6.24 are you using tg3 driver?

----------

## jody

 *Quote:*   

> you can use rpm2targz to convert the rpm file into a more manageable format

 

I am not very knowledgeable about the finer technical details concerning the kernel and its modules.

It seems that this tool will turn an rpm into something tarred and gzipped, but then - what?

 *Quote:*   

> on 2.6.24 are you using tg3 driver?

 

I think so - it appears as tg3.ko in /lib64/modules/2.6.24-gentoo-r7...

and is shown by lsmod. 

But then again i don't know how to find out what driver is really being used...

Is there some easy method to find out?

Thank you for your support

  Jody

----------

## devilheart

well, something is inconsistent. the correct driver for your NIC is tg3. in the opening post you said that tg3 driver was compiled built-in, therefore there should not be any tg3.ko file around. i would try to do this:

1)delete your module directory (should be /lib/modules/2.6.27-gentoo-r7)

2)clean your kernel sources using make clean

3)check that tg3 driver will be compiled as module

4)rebuild your kernel and install it (both image and modules)

5)rebuild any other driver (like nvidia-drivers)

6)reboot and load tg3 module

----------

## jody

Thanks devilheart, i'll try this.

Just to make sure: *Quote:*   

> 2)clean your kernel sources using make clean

 I have to do this in /usr/src/linux-2.6.27-gentoo-r7, correct?

 *Quote:*   

> 3)check that tg3 driver will be compiled as module 

 That would mean mark it with '[M]' in the menuconfig program, or put 'CONFIG_TIGON3=m' in the file .config, correct?

 *Quote:*   

> 4)rebuild your kernel and install it (both image and modules)

 That would be 'make && modules_install', correct?

 *Quote:*   

> 6)reboot and load tg3 module

 "load tg3" means 'modprobe tg3', correct?

Thank You 

  Jody

----------

## jody

I followed the steps you lined out, and was rewarded with success  :Smile:  !

After 'modprobe tg3' i did a 'ifconfig eth0 up' and the network was running.

Thanks!

----------

