Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Udev net naming for portable system
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
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1172
Location: Edinburgh, UK

PostPosted: Thu May 02, 2013 12:45 pm    Post subject: [SOLVED]Udev net naming for portable system Reply with quote

Hi,

Looks like a lot of fun is being had over new udev net naming. I think I've got that covered for all my day-to-day systems, but I do have a little side-project for which I'm not sure how to proceed.

This is a portable install on a USB drive, intended to be "go-anywhere" so of course the net names based on bus location, MAC address etc are no good. Kernel naming (avoiding the whole udev mess) would probably usually be adequate, but not for the odd silly driver that produces an interface name other than ethX / wlanX (a few of these still exist, right?).

Now I don't mind my *own* silly names, as long as they're consistent, so the simplest approach seems to be custom rules. On the other hand, I'm not sure if I've got enough to go on.

What I'd want would be certainty that the first wired device would be called, let's say, "wired0" and the first wireless "wless0" on any possible hardware. Looking at the existing 70-persistent-net.rules file, it seems that wired vs wireless is determined by kernel names, which falls foul of the silly-driver problem. So is there any other way of telling them apart?

Thanks in advance.


Last edited by Havin_it on Thu May 02, 2013 4:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Thu May 02, 2013 2:00 pm    Post subject: Reply with quote

All ethernet drivers use ethX, and there's only one wifi driver which doesn't use wlanX that you need to bother with - ipw2200. That one is easily taken care of with this:
Code:
SUBSYSTEMS=="pci", DRIVERS=="ipw2200", NAME="wlan0"


So disable udev's renaming, put the above rule in place, and you're set.
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1172
Location: Edinburgh, UK

PostPosted: Thu May 02, 2013 4:05 pm    Post subject: Reply with quote

Really, there's only one left? That's flabbergasting (in a good way)!

Before my wifi needs got stabilised (guess I've been lucky for a while) there were a panoply of rt0, ath0 and many other oddities floating around. Indeed my aforementioned 70-persistent-net.rules file contains a rule for ath0 (from before ath5k surpassed madwifi in reliability).

Happy days! :D
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