The exact same issue exists on Ubuntu Server Edition, however it is
quite different on that platform.

There is NO /etc/udev/rules.d/70-persistent-net.rules, the closest thing
is "85-ifupdown.rules", but it only defines some default actions to
perform whenever an ethernet interface is found, you cannot add your own
SUBSYSTEM=="net" rules (as per the bottom of post 11 by Serge for
instance).

Instead we have a file called /etc/iftab.

This file is incredibly unintelligent. Why? Because it hardcodes device
names to mac addresses, so instead of the first ethernet address getting
eth0, it reserves that name for a specific mac address. In effect this
means that if you install Ubuntu Server Edition on 1 PC with one Mac
address, then move it to PC #2 with a different mac address, then
/etc/iftab will be assigning the ethernet interface of that computer to
eth1, because eth0 is reserved to the mac address of the OLD computer.
That is absolutely ridiculous!

Why is it ridiculous? Well, because /etc/network/interfaces is setup to
configure internet access and dhcp on eth0, so if you  change computers
you are left without network connectivity unless you manually do
"dhclient eth1".

I had to spend 3 hours tracking down this issue with lots of help from
the people in #linux, and tried everything. I looked at loaded driver
modules, I looked at config files everywhere, I edited
/etc/network/interfaces. What happened was that while the system was
booting it referred to my ethernet device as "eth0", but as soon as the
system was finished booting it was suddenly called "eth1".

In the end I had an idea that perhaps eth0 was reserved for my old mac
address (on the computer I used when I installed Ubuntu Server Edition
on this flash drive). This hadn't occured to me earlier because that is
a retarded design, linux is meant to be able to run on different
hardware simply by putting the harddrive in another computer, and
locking down the eth0 name by mac address is pure stupidity in that
regard. Even more so because you're unable to connect to the network by
default after moving your usb drive to another computer.

So what I did was navigate to /etc and type grep -R -i
"00:16:35:7E:74:69", which is the mac address from PC #1 where I
installed Ubuntu from, and got these results:

[EMAIL PROTECTED]:/etc# grep -R -i "00:16:35:7E:74:69"
/etc/iftab:eth0 mac 00:11:2f:92:4a:8d arp 1

I went into that file and put my NEW (PC #2) mac address there, so it
looked like this:

[EMAIL PROTECTED]:/etc# cat /etc/iftab
# This file assigns persistent names to network interfaces.
# See iftab(5) for syntax.

eth0 mac 00:16:35:7E:74:69 arp 1

Now my interface is being assigned to eth0 and I get network
connectivity right away. I could have solved this by changing
/etc/network/interfaces to eth1 instead, but that would have been
accepting the problem.

I propose that you remove this /etc/iftab hard-coding, and leave the
hard-coding up to the user!

All it serves to do right now is locking down the installation so that
you cannot change computers/network interface.

I hope that this is of help to everyone else, it seems like quite a
common problem but I had never seen this particular (Ubuntu Server
Edition) solution!


All the best,
Christopher Hilding

-- 
Live CD contains persistent network interfaces for the livefs build machine
https://bugs.launchpad.net/bugs/123559
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to