Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
new baselayout, coldplug and network interface order: SOLVED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
boroshan
l33t
l33t


Joined: 16 Apr 2003
Posts: 730
Location: upside down

PostPosted: Wed Jan 18, 2006 8:45 am    Post subject: new baselayout, coldplug and network interface order: SOLVED Reply with quote

Hi All,

Synopsis: Coldplug loads network modules in reverse order to modules.autoload.d. As a result wired and wireless network interfaces have had their names swapped. Udev rules written to dictate names doesn't seem to work. Advice on improving said rules sought.

I have a problem after the latest ~x86 baselayout. The new layout suggests that network modules in particular not be loaded from modules.autoload.d lest they start the associated network servces at a critical juncture. Fair enough - I removed my tg3 module for my wired lan, and the ipw2200 one for my wireless interface.

Now, I have coldplug installed, and added to the default runlevel. As advertised, coldplug detects the hardware and loads the appropriate modules.

The problem is that it loads the ip2200 before the tg3, so my eth0 and eth1 are reversed. This is a pain because I have a load of scripts and the like that assume the old mapping. I don't mind changing them once, but I don't want to keep doing so. Therefore, I'd like to understand what happened, and also to define the order myself so I can rely upon it in future. I can do it trivially, by reloading the modules in the proper order, say in local.start, but I'd prefer not to klugde this one

Anyway, I had a shot a udev rule writing to solve this based on Daniel Drake's udev rule guide. I added these lines to /etc/udev/rules.d/10-local.rules:
Code:

KERNEL="eth*", SYSFS{address}="00:c0:9f:c4:2c:b5", NAME="eth0"
KERNEL="eth*", SYSFS{address}="00:c0:9f:c4:2c:b5", NAME="eth1"

Where the SYSFS values were gathered using
Code:
udevinfo -a -p /sys/class/net/interface


Sadly, this makes no difference - possibly because since I'm matching on eth* the device assignments have already been made.

So: how can I better write those rules: I'd expect I can just chop off the KERNEL part and patch on the MAC id which ought to be unique, but I don't have a very clear understanding of this stuff, so advice would be welcome.

While I'm on, does anyone know where I can pass led=1 to ipw2200 if not in modules.autoload.d?

Thanks,

Nick

[ edit ] Apparently there's a 'd' in 'coldplug. Who knew? ;) Also, marked subject SOLVED
_________________
Don't let THEM immanentize the Eschaton!


Last edited by boroshan on Thu Jan 19, 2006 8:27 am; edited 4 times in total
Back to top
View user's profile Send private message
_loki_
l33t
l33t


Joined: 18 Dec 2003
Posts: 680
Location: in the shell

PostPosted: Wed Jan 18, 2006 3:48 pm    Post subject: Reply with quote

udev sound like a good idea..
Quote:

KERNEL="eth*", SYSFS{address}="00:c0:9f:c4:2c:b5", NAME="eth0"
KERNEL="eth*", SYSFS{address}="00:c0:9f:c4:2c:b5", NAME="eth1"

point to the same hardware.. There should be different MAC Adresses for the different devices.
Code:

udevinfo -a -p /sys/class/net/eth0
udevinfo -a -p /sys/class/net/eth1


should give the same results..
Back to top
View user's profile Send private message
boroshan
l33t
l33t


Joined: 16 Apr 2003
Posts: 730
Location: upside down

PostPosted: Wed Jan 18, 2006 4:15 pm    Post subject: That did the trick Reply with quote

_loki_ wrote:

There should be different MAC Adresses for the different devices.
Code:

udevinfo -a -p /sys/class/net/eth0
udevinfo -a -p /sys/class/net/eth1


should give the same results..


That's what I did - I must have messed up the cut and paste. Fixed the addresses and it works as expected.

Thank you for your kind assistance; it would have taken me a long time to notice that particular piece of carelessness.
_________________
Don't let THEM immanentize the Eschaton!
Back to top
View user's profile Send private message
_loki_
l33t
l33t


Joined: 18 Dec 2003
Posts: 680
Location: in the shell

PostPosted: Wed Jan 18, 2006 4:17 pm    Post subject: Reply with quote

glad I could help; and even more glad udev finally works the way it should!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum