LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   [debian] Device "eth0" does not exist (http://www.linuxquestions.org/questions/linux-networking-3/%5Bdebian%5D-device-eth0-does-not-exist-4175444840/)

Luno 01-09-2013 12:12 PM

[debian] Device "eth0" does not exist
 
Hi,

I created a custom image (based on Squeeze) with live helper to deploy a preconfigured system on other machines. Most stuff seems to be working just fine, but I can't get the network interfaces up.

I get the following errors:

On boot (last line prior to login):
Code:

Device "eth0" does not exist
ifconfig eth0:
Code:

eth0: error while getting interface flags: no such device
lspci shows all the ethernet controllers. The required module is being loaded on startup (Broadcom NetXtreme Gigabit Ethernet module "bnx2")

I found others with similar problems and for most rewriting or deleting "xx-persistent-net.rules" does the trick. Unfortunately, that does nothing for me. If deleted, it's not even being rewritten as claimed, if edited, nothing changes.

During installation of the custom image, the NICs were detected and working out of the box. There has to be some active configuration file from the machine I created the image on that somehow interferes with the network setup, but so far, I've had no luck locating it. Also likely: I'm missing something really basic, I'm good at that :D.

Any hints & help appreciated.

business_kid 01-09-2013 01:26 PM

If eth0 isn't there, whatever module the nic needs isn't loaded or hasn't grabbed it. Go figure.

Caveat: Some old (10 years old) network cards did not do flexible interrupts. I had a box that would lose it's nic if the nic was assigned irq 12 instead of what it wanted, irq 11. Realtek something (8139??)

Guttorm 01-09-2013 01:37 PM

Hi

I think you need to install "firmware-bnx2". It's non-free. If it's going to be used on different computers, you could install "firmware-linux-nonfree" to get all of those non-free binary blobs.

Luno 01-10-2013 10:27 AM

Seems like I got the wrong module - "tg3" is the one I need. Problem: Still doesn't work.

Strangely enough, If I start up the live system, the NICs are being recognized without any problem, lspci -v shows module tg3 in use and eth0 + eth1 are up and working. But after installing the image to the HD they're gone again.

Guttorm 01-10-2013 11:40 AM

Not sure, but I think tg3 also needs non-free firmware. But if it's missing, the live cd shouldn't work either.

The command "dmesg | less" should give some clue about what's happening. It's usually lots of info there. If you press "/" for search and type eth you should get to the interesting part.

It could be that the devices are being renamed by udev. The dmesg info should tell you if that is the case.

When the kernel finds a new NIC with an unknown MAC address, it stores it in the file "/etc/udev/rules.d/70-persistent-net.rules". It can contain things like:

Quote:

# PCI device 0x14e4:0x163b (bnx2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:2b:cb:13:fd:f1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
As long as this line is there, no other NIC can get the name eth0 so they will be renamed. Removing all such lines and rebooting will stop the renaming.

business_kid 01-10-2013 12:32 PM

have you /lib/firmware in the image?

Luno 01-14-2013 10:16 AM

Quote:

have you /lib/firmware in the image?
Jep.

Quote:

Originally Posted by Guttorm (Post 4867151)
The command "dmesg | less" should give some clue about what's happening. It's usually lots of info there. If you press "/" for search and type eth you should get to the interesting part.

dmesg shows nothing at all concerning ethernet devices.

Editing/deleting/removing lines in /etc/udev/rules.d/70-persistent-net.rules doesn't do anything. To make sure I didn't create a bad image, I tested it on a few other machines with different hardware - everything works fine.

If I install a generic Debian on the server (which is a HP ProLiant 320e Gen8 by the way), the NICs are being detected without any problems.


@business_kid:
You wrote something about IRQs? I think it's possible the problem is rooted somewhere in the hardware setup (given that dmesg doesn't even mention ethernet devices). Unfortunately, I have little to no knowledge in that area. The BIOS Setup allows me to change IRQs for most devices, but I don't want to start throwing values around without really knowing what I'm doing.

LeoPap 01-14-2013 10:33 AM

Please post the results, after running this command:

ifconfig -a

Luno 01-14-2013 10:40 AM

Quote:

Originally Posted by LeoPap (Post 4869691)
Please post the results, after running this command:

ifconfig -a

ifconfig -a only shows the loopback interface.

LeoPap 01-14-2013 10:48 AM

try running the following commands.

ifdown eth0
ifup eth0

ifconfig -a

What are the results now? Same?

Luno 01-14-2013 11:06 AM

Quote:

Originally Posted by LeoPap (Post 4869711)
try running the following commands.

ifdown eth0
ifup eth0

ifconfig -a

What are the results now? Same?

There are none - ifdown eth0 returns "eth0 not configured".

The network configuration should be fine - I think the source of the problem is somewhere deeper in the system and is caused by something preventing the kernel module to grab the NIC.

LeoPap 01-14-2013 11:13 AM

Quote:

Originally Posted by Luno (Post 4869726)
There are none - ifdown eth0 returns "eth0 not configured".

The network configuration should be fine - I think the source of the problem is somewhere deeper in the system and is caused by something preventing the kernel module to grab the NIC.

Do you have internet connection?

Try setting eth manually with: system-config-network

business_kid 01-14-2013 03:57 PM

Quote:

@business_kid:
You wrote something about IRQs? I think it's possible the problem is rooted somewhere in the hardware setup (given that dmesg doesn't even mention ethernet devices). Unfortunately, I have little to no knowledge in that area. The BIOS Setup allows me to change IRQs for most devices, but I don't want to start throwing values around without really knowing what I'm doing.
Never spotted that. I have a tigon 3 card in a box here. What I said about interrupts certainly doesn't apply - it's a 1Gb card which is @$%! fast but not super fast.

It needs firmware. Have a look in an X terminal at the output of

Quote:

grep firmware /var/log/messages
and see if it is requesting firmware and/or finding it.

Luno 01-15-2013 05:03 AM

Quote:

It needs firmware. Have a look in an X terminal at the output of

Code:

grep firmware /var/log/messages
and see if it is requesting firmware and/or finding it.
No "firmware" found in /var/log/messages.

business_kid 01-15-2013 05:14 AM

@#%$! It doesn't report it - I'm on the box with the tigon 3 card and it doesn't show firmware being loaded. But look at this:
Quote:

bash-4.2$ ls /lib/firmware/tigon
tg3.bin tg3_tso.bin tg3_tso5.bin
Have you got those?


All times are GMT -5. The time now is 12:56 AM.