Lost eth0 in Ubuntu
October 19, 2007 | 11:37Perhaps you moved your hard disk with Ubuntu into another machine or you changed some of the hardware including your NIC and now you have got eth1 instead of eth0.
Why this happens? Because Ubuntu uses by default a package named ifrename which can associate a MAC address to a NIC name (i.e. ethx where x is an integer number). This is done in order to avoid the udev behaviour to name randomly the interfaces during boot time.
How can I fix this issue? Just get your new NIC’s MAC address with:
$ sudo ifconfig | grep eth
The sequence you need is typically at the end of the line and it consists of a colon-separated list of 6 hexadecimal numbers (i.e. a0:b1:c2:d3:e4:f5). Now edit /etc/iftab, comment out the current line and add something like:
eth0 mac <new NIC MAC address> arp 1
(just replace <new NIC MAC address> with the real new MAC address)
Reboot and enjoy your old dear eth0













Larry Irwin | December 12, 2008 | 0:03
I had a similar issue on my Debian Etch amd64 2.6 server:
Linux version 2.6.18-6-amd64 (Debian 2.6.18.dfsg.1-23) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Wed Oct 15 10:07:11 UTC 2008
It kept adding MAC entries into /etc/udev/rules.d/z25_persistent-net.rules…
I found that the following would work:
1) remove your NIC module (on my server: rmmod e1000)
2) clear out the udev rules text file for the NIC (on my server: >/etc/udev/rules.d/z25_persistent-net.rules)
3) load the NIC module back (on my server: modprobe e1000)
4) restart the network services (on my server: /etc/init.d/networking restart)
Presto! Made eth3 go back to eth0! Yeah!
Robin Bowes | January 23, 2009 | 13:16
Yo! Larry’s comment fixed a similar problem for me.
I had a Ubuntu 7.10 VMware guest machine that I wanted to migrate to VirtualBox. It all worked fine, apart from networking.
I followed Larry’s instructions, changing the mac address for eth0 in /etc/udev/rules.d/70-persistent-net.rules and all is well again!
Thanks!
R.
ubuntu ethxx rename « All About My Life | February 5, 2009 | 4:44
[...] http://mydebian.blogdns.org/?p=177 # /etc/init.d/networking stop [...]