# [Solved] network interface eth0 does not exist

## wilf

I have problems with a new OpenVZ enabled 2.6.18 kernel I have been  building. The machine boots cleanly with a 2.6.23.1 non-OpenVZ kernel thanks to arndawg and his comments  on udev.

The machine is new but based on various bits I had lying around, it has two 80Gb SATA drives in software RAID 1 for root etc., and two 160Gb IDE drives in software RAID 1 for data. The motherboard is a Gigabyte M61PM-S2 , using the nVIDIA GeForce 6100/nForce 430 chipset.

Using the 2.6.23.1 kernel I can get in with a couple of ssh sessions, and I have stepped through make menuconfig for both kernels next to each other to try and discover what is different. They look largely similar although they have different options as their versions are so far apart.

lspci for each kernel is identical, and follows:-

```
00:00.0 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a1)

00:01.0 ISA bridge: nVidia Corporation MCP61 LPC Bridge (rev a2)

00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)

00:01.2 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a2)

00:02.0 USB Controller: nVidia Corporation MCP61 USB Controller (rev a2)

00:02.1 USB Controller: nVidia Corporation MCP61 USB Controller (rev a2)

00:04.0 PCI bridge: nVidia Corporation Unknown device 03f3 (rev a1)

00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)

00:06.0 IDE interface: nVidia Corporation MCP61 IDE (rev a2)

00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)

00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)

00:08.1 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)

00:0d.0 VGA compatible controller: nVidia Corporation Unknown device 03d0 (rev a2)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:0e.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)
```

lsmod has a few differences - notably  the output of lsmod for the 2.6.23 kernel contains just headers

```
Module                  Size  Used by
```

whereas lsmod for the knackered 2.6.18 OpenVZ kernel contains:-

```
Module                  Size  Used by

ohci_hcd               20612  0

ehci_hcd               30088  0

usbcore               127656  3 ohci_hcd,ehci_hcd

sg                     35496  0

sr_mod                 16036  0

cdrom                  38184  1 sr_mod
```

So I am stuck. Attempting to start networking with /etc/init.d/net.eth0 start on the OpenVZ kernel gives

```
network interface eth0 does not exist
```

Interestingly /etc/udev/rules.d/70-persistent-net.rules seems to get larger with every reboot. eth[1-4] have each appeared after subsequent reboots. I have also noticed that when the good 2.6.23 kernel starts, I get a boot message about net.eth0 after udev-postmount, but not with the OpenVZ kernel. Here is 70-persistent-net.rules. eth[0,1] are correct. eth[2-4] are utter tosh.:-

```
fox ~ # cat /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, probably 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 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:4d:84:28:53", NAME="eth0"

# Firewire device 001a4d0000e8d09f)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:4d:00:00:e8:d0:9f", NAME="eth1"

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:10:5c:2e", NAME="eth2"

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:59:01:27", NAME="eth3"

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:29:7d:39", NAME="eth4"
```

I will be very grateful for your help in this,

Best Regards, Paul.Last edited by wilf on Wed Oct 17, 2007 7:56 pm; edited 1 time in total

----------

## Spear

 *wilf wrote:*   

>  Here is 70-persistent-net.rules. eth[0,1] are correct. eth[2-4] are utter tosh.:-
> 
> ```
> fox ~ # cat /etc/udev/rules.d/70-persistent-net.rules
> 
> ...

 

Does ifconfig show the adapters MAC address as changing each time?

----------

## wilf

Hi Spear,

When booting with the 2.6.23.1 network working kernel the first entry in /etc/udev/rules.d/70-persistent-net.rules is correct. networking works, I see

* Device initiated services: net.eth0 udev-postmount

First entry in /etc/udev/rules.d/70-persistent-net.rules:-

```
# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:4d:84:28:53", NAME="eth0"
```

If I continue booting with the 2.6.23.1 kernel, no new lines are added to this file and networking works every time.

```
fox ~ # uname -a

Linux fox 2.6.23.1 #2 SMP Tue Oct 16 11:01:44 BST 2007 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ AuthenticAMD GNU/Linux
```

However, when booting with the OpenVZ networking knackered kernel, I see only

* Device initiated services: udev-postmount

and with each reboot, following lines are added

```
# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:10:5c:2e", NAME="eth2" 
```

with the eth# incrementing with each reboot.

So it looks like the OpenVZ enabled kernel detects a different MAC address, but spots the correct forcedeth driver. (FX: Spooky twilight zone noises)

```
fox ~ # uname -a

Linux fox 2.6.18-028stab045 #8 SMP Tue Oct 16 09:29:41 BST 2007 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ AuthenticAMD GNU/Linux
```

Best Regards, Paul.

----------

## Spear

Then it's not the issue I suspected it may have been, I'm at a loss then.

----------

## wilf

Well, I have moved a lot further.

I did a bit of digging (diffing the dmesg o/p) and discovered the only significant difference seemed to be that 2.6.23.1 runs the forcedeth .60 driver, whereas 2.6.18 runs the .56 forcedeth driver.

I had a look in the .60 driver and noticed one of the changes looked like it might be a fix for my problem.

```
 *      0.56: 22 Mar 2006: Additional ethtool config and moduleparam support.

 *      0.57: 14 May 2006: Mac address set in probe/remove and order corrections.

 *      0.58: 30 Oct 2006: Added support for sideband management unit.

 *      0.59: 30 Oct 2006: Added support for recoverable error.

 *      0.60: 20 Jan 2007: Code optimizations for rings, rx & tx data paths, and stats.
```

Looks like 0.57 was the fix. So I started backporting the 0.60 driver to 2.6.18.

After a couple of hours (and noticing things inside 2.6.23.1 are quite different) I finally had a hack Ooops! backport ready for testing.

Up she comes... and Yes! I see the:-

* Device initiated services: net.eth0 udev-postmount

message - it has at last found my net.eth0.

This was closely followed by the delightful

```
Kernel Panic - not syncing: Aieee, Killing interrupt handler!
```

So I guess I haven't correctly interpreted those interrupt handling changes, but Gosh! That was fun!

Not sure how to go about pursuading the kernel guys to backport the fixes - it wasn't to hard to get where I am, but then it doesn't work  :Smile: 

They are welcome to my work, FWIW.

Or someone could mail me 0.57 if they are feeling kind.

Now I know that it's the driver, I shall just bang in an old (crappy) 8139 for the time being.

Best Regards, Paul.

----------

## wilf

Right,

Given up on knackered Forcedeth driver and bunged in an old 8139 (don't you just love 'em?).

Problem solved.

Everything works.

Going to bed.

Best Regards, Paul.

----------

## manaru

Hi,

I have the same problem, my MAC is changing after every reboot with ASrock Mainboard "ALiveNF6G-DVI"

00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)

Linux Comp 2.6.23-gentoo-r3 #10 SMP Fri Jan 4 18:14:47 CET 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux

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

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:82:03:15", NAME="eth2"

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:4e:87:e5", NAME="eth3"

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:46:ab:d0", NAME="eth4"

# PCI device 0x10de:0x03ef (forcedeth)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:b2:d2:4f", NAME="eth5"

```

I solved it by removing "eth*" from /etc/udev/rules.d/75-persistent-net-generator.rules

 *Quote:*   

> 
> 
> # device name whitelist
> 
> KERNEL!="ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end"
> ...

 

I know this is not the best way but a workaround  :Wink: 

----------

