Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] udev module loading order

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Chris Dombroski <cdombroski AT icanttype.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] udev module loading order
  • Date: Thu, 13 Apr 2006 12:23:31 -0400

Quoting Juuso Alasuutari <iuso AT sourcemage.org>:

Udev will not load modules in a set order, which results in network interfaces
and sound devices popping up with randomly ordered names. This is not a bug
but a fact resulting from various conditions. This wisdom was revealed to me
on linux-hotplug-devel in this message:
http://marc.theaimsgroup.com/?l=linux-hotplug-devel&m=114488954524629&w=2

Although SMGL does not imply udev, and udev's module autoloading does not
imply having set interface names, I feel this is a nagging issue
nevertheless. While adding udev rules to bind interface names is easy for
anyone to do with simple instructions (which we don't have btw), it's a bit
embarrassing for us when a relatively helpless new user can't keep his
networking in one piece after initial SMGL install. Most if not all distros
can at least fulfill this "little" requirement to ensure a pleasant start.

What I've described here is imho the last and most annoying thing standing
between us and The Future(TM). Yes, kill the beast that is hotplug. So I'm
asking for ideas on how we could at least ensure that the network interfaces
are consistent from boot one. Maybe add a script to the udev spell which
automatically creates 00-binding.rules to carve the interface loading order
in stone? I don't think it would be difficult.

Juuso

I don't know about an automatic way of doing something intelligent, but writing persistent device rules looks to be pretty simple (#1). I've written rules for the cards on my firewall; I haven't tested them outside of udevtest yet, but they should work:

root@creator:~# cat /etc/udev/rules.d/00-persistent-net.rules
KERNEL=="eth*",SYSFS{address}=="00:20:18:d9:49:19",NAME="eth0"
KERNEL=="eth*",SYSFS{address}=="00:04:5a:7a:d3:01",NAME="eth1"

Unfortunately, it looks like the MAC address is the only useful identification information in SYSFS. Anyhow, I've lost track of where I was going with this so here's some information from udevtest:

root@creator:~# udevtest /class/net/eth0
main: looking at device '/class/net/eth0' from subsystem 'net'
udev_rules_get_name: rule applied, 'eth0' becomes 'eth0'
root@creator:~# udevtest /class/net/sit0
main: looking at device '/class/net/sit0' from subsystem 'net'
udev_rules_get_name: no node name set, will use kernel name 'sit0'

#1: http://reactivated.net/writing_udev_rules.html#example-iface

Attachment: bincD7OXeCZ1G.bin
Description: PGP Public Key




Archive powered by MHonArc 2.6.24.

Top of Page