Yves Glodt wrote:
Hi,
I have a strange problem... I have a box running ubuntu dapper, and all
is fine.
Now I cloned the disk, and put it into another box which is 100& the
same hardware, and it still works fine, apart of one thing...
What was eth0 and eth1 before is now eth2 and eth3 :-/
root@box:~# ifconfig -s -a
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP
TX-OVR Flg
eth2 1500 0 1071 0 0 0 638 0 0 0 BMRU
eth3 1500 0 0 0 0 0 0 0 0 0 BMU
lo 16436 0 66 0 0 0 66 0 0 0 LRU
sit0 1480 0 0 0 0 0 0 0 0
0 O
root@box:~#
How can I go back to eth1/2 ?
Best regards,
Yves
p.s.
The NICs are an e1000 and a via_rhine, and unfortunately I found no way
of forcing the interface name on module load, that would be my preferred
solution...
I recently had a similar problem on a SuSE 10.0.
It turns out that this distribution has "persistent names" for network
cards. Whenever a "new" network card is seen, udev finds a not yet used
name for it and stores it into
/etc/udev/rules.d/30-net_persistent_names.rules
In my case, problems started happening when one network card (a D-Link)
"forgot" its MAC address, and udev thought it was a new card and gave it
a new name (eth2 instead of eth0 that it had before).
Maybe on Ubuntu there is a similar file for persistent names? (Directory
is probably the same, but name may be different...)
On SuSE, it has lines such as the following:
SUBSYSTEM=="net", ACTION=="add",
SYSFS{address}=="00:04:61:45:6b:1c",
IMPORT="/sbin/rename_netiface %k eth2"
If you just edit the card's name (eth2) in this example, and reboot the
system, you should find your old names.
If you delete the lines, udev will fill in lines for the new cards by
itself, starting at eth0 (if there is no eth0 line there yet).
There is also /etc/iftab which might be useful
Regards,
Alain