Bryan Kadzban wrote:
Alexander E. Patrakov wrote:
(20:29:08) Tizer: Interface eth0 doesn't exist... why not?

Here's what we have today:

These rules will always rename the network cards to "realtek" and "intel", independently of the original numbering provided by the kernel (i.e.: the original "eth0" and "eth1" interfaces will no
longer exist, unless you put such "descriptive" names in the NAME
key). Use the descriptive names from the Udev rules instead of "eth0"
in the network interface configuration files below.

Perhaps we could say "naming" instead of "numbering" ("independently of
the original naming provided by the kernel")?

(20:39:14) Tizer: ch 7.13.2 needs amending to the name used in the
first section

Oh, that makes more sense.

Well, how about this then.  Recent udev versions (I think udev-095) can
handle renaming to eth0/eth1/whatever, because if the name is currently
in use, it'll rename it to something else, and then wait until the real
target name is *not* in use.  Older versions would fail if the kernel
assigned eth0 to one device and eth1 to another, then udev tried to swap
the names -- both renames would fail because the target device name
already existed.  But recent udevs will use a temporary name, then
sleep, then try again, until they succeed.

This means we can tell the user to create a stable rule, but they can
choose which device is eth0, which is eth1, etc.  So I'd suggest keeping
most of the text in 7.13.1, up until right after the "grep -H" that
finds the MAC addresses.  Then, something like:

For each network card (but not for the loopback interface), decide which eth* name to give it (eth0, eth1, etc.). Then create Udev rules similar to the following:

cat > /etc/udev/rules.d/26-network.rules << "EOF"
ACTION=="add", SUBSYSTEM=="net", DRIVER=="?*",
    SYSFS{address}=="00:e0:4c:12:34:56", NAME="eth0"
ACTION=="add", SUBSYSTEM=="net", DRIVER=="?*",
    SYSFS{address}=="00:a0:c9:78:9a:bc", NAME="eth1"
EOF

(With the appropriate lack of word-wrapping, of course.)

Then we should use the same names in the by-ID rules given below that,
and also fix the paragraph following.  Something like:

These rules will always name the network cards "eth0" and "eth1", independently of the (unpredictable) numbering provided by the
kernel.

Sound good?

Good, if we append this:

Instead of "eth0" and "eth1", you can use descriptive names of
your own choice, like "realtek" and "intel". If you do this, remember
to use your interface names everywhere, since the "eth0" and "eth1"
interfaces will not exist in this case.

One more issue is with Atheros wi-fi driver: it reportedly creates two interfaces with identical MAC addresses, and our rules go crazy. Since I don't have the corresponding hardware, I can't offer a working solution.

Exactly because of this pile of solved and unsolved nuisances that ruin the whole idea of proper hardware autodetection, I think that LFS-6.3 should go without udev. For now, I think we should at least mention a problem.

--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to