# /dev/ethX - is it supposed to exist? (solved)

## Jaglover

I was under impression every piece of hardware has a node in /dev pointing to it. There is no /dev/eth0. However, ifconfig shows eth0 up and configured.   :Shocked:  Can somebody explain me what the heck is going on, please?Last edited by Jaglover on Mon Dec 07, 2009 8:52 pm; edited 1 time in total

----------

## NeddySeagoon

Jaglover,

/dev/eth0 does not exist.

eth0 is neither a character device, nor a block device. You don't read/write blocks/characters to/from it so its not in /dev

----------

## Jaglover

NeddySeagoon,

thanks for reply. Never thought the network interface is not char/block. Allegedly everything is a file in *NIX. Where is eth0? If it does not belong to /dev - how comes udev manages ethX?

The problem: After a BIOS flash my NIC has invalid MAC address ff:ff:... I can set it up manually by assigning a valid MAC and IP address to it but this setup does not survive reboot. I was thinking about hacking the init scripts to make it work. To accomplish that I have to know what I am doing.   :Rolling Eyes: 

----------

## NeddySeagoon

Jaglover,

You can assign a mac address in the /etc/conf.d/net file, no need to hack anything.

mac addresses are supposed to be unique in the world, which makes it difficult to host a BIOS update containing mac addesses.  The BIOS flash program should save the old mac addresses and write them into the new BIOS when its done.

It clearly didn't.

----------

## Jaglover

NeddySeagoon, 

thanks again.   :Smile: 

The trouble is for some reason udev fails on an NIC with invalid MAC address, the net file is never processed as a result. Actually, via_rhine kernel driver fails too while doing MAC address sanity test, I had to remove this check to make the driver load.

Maybe I should hack that BIOS file instead to get a valid hardware address.   :Confused: 

----------

## NeddySeagoon

Jaglover,

At first sight hacking the BIOS may not be too bad but the MAC address may be covered by the BIOS checksum, so you probably have exactly one chance to get that right. The only way you can test is by flashing the BIOS and a BIOS checksum error is normally fatal. That is, you won't be able to boot to flash the BIOS again.

Raise a bug with the BIOS vender but don't expect a fast turnaround.  While you are waiting, invest in a plug in card.

----------

## Jaglover

Well, I managed to get it working. After some fiddling with iproute2 the net file suddenly is read - despite udev is still failing on this onboard NIC. Meaning MAC address is assigned to it along with an IP address, and all daemons depending on net are started too! Exactly what doctor ordered.   :Very Happy:  BTW, this box has only one PCI slot which is not free.

The whole trouble probably is caused by flashrom utility. I believe manufacturers flash utility preserves a certain region in the BIOS. The only way to use it is creating a bootable DOS CD, I thought I'd try sys-apps/flashrom first.

----------

