Re: [gentoo-user] Re: Ethernet Machination
On Sat, Jan 5, 2013 at 11:45 AM, Mark Knecht markkne...@gmail.com wrote: On Sat, Jan 5, 2013 at 8:03 AM, Kerin Millar kerfra...@fastmail.co.uk wrote: james wrote: After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Beware. SNIP This doesn't appear to be common knowledge, so it struck me as worth mentioning. Cheers, --Kerin Very interesting info. Thanks! Cheers, Mark I think the proper explanation is here: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México
Re: [gentoo-user] Re: Ethernet Machination
james wrote: After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Beware. The automatic persistent net rules generator is intrinsically broken because naming eth* devices within the same namespace (eth* to eth*) can break things horribly. I have had this happen to me on several occasions and was helping someone out in #gentoo who had experienced the same issue only recently. For more information, take a look at this bug: https://bugzilla.redhat.com/show_bug.cgi?id=782145 Because of this, Kay Sievers has removed the rule generator from later versions of udev (*). The current version of udev marked stable in gentoo still has it but it can be disabled by setting USE=-rule_generator. I've started doing exactly that on my systems because it has only ever caused problems instead of providing solutions. Besides which, eventually a version of udev will be stabilized that no longer has it. If you want to use persistent net rules, the only safe way of doing it is to define the rules manually and to rename interfaces in such a fashion that they don't conflict with the existing device namespace. For example, you could rename eth0 to lan, eth1 to dmz or whatever is deemed appropriate. This doesn't appear to be common knowledge, so it struck me as worth mentioning. Cheers, --Kerin * I cannot recall the exact version off-hand.
Re: [gentoo-user] Re: Ethernet Machination
On Sat, Jan 5, 2013 at 8:03 AM, Kerin Millar kerfra...@fastmail.co.uk wrote: james wrote: After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Beware. SNIP This doesn't appear to be common knowledge, so it struck me as worth mentioning. Cheers, --Kerin Very interesting info. Thanks! Cheers, Mark
Re: [gentoo-user] Re: Ethernet Machination
On Wed, Jan 02, 2013 at 08:57:07PM +, james wrote: Well is all works automatically, but udev did not create the files I thought it would upon reboot: rules.d # ls -alg total 12 drwxr-xr-x 2 root 192 Jan 2 14:37 . drwxr-xr-x 4 root 152 Dec 9 23:26 .. -rw-r--r-- 1 root 1896 Sep 30 08:13 70-persistent-cd.rules -rw-r--r-- 1 root 2652 Aug 20 2010 70-persistent-cd.rules.old -rw-r--r-- 1 root 948 Dec 3 03:52 70-persistent-net.rules.31dec2012.old After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Move on, or hand edit the '70-persistent-net.rules' file? run dispatch-conf and see what it offers -- Happy Penguin Computers ') 126 Fenco Drive ( \ Tupelo, MS 38801 ^^ supp...@happypenguincomputers.com 662-269-2706 662-205-6424 http://happypenguincomputers.com/ Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting
Re: [gentoo-user] Re: Ethernet Machination
On Wed, Jan 2, 2013 at 12:57 PM, james wirel...@tampabay.rr.com wrote: Mark Knecht markknecht at gmail.com writes: So now that only one ethernet shows up, how do I prevent udev from renaming eth0 to eth3? Probably remove any net-persistent rules that are hanging around. That should free up udev to do more of what you suspect. SNIP After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Move on, or hand edit the '70-persistent-net.rules' file? TIA, James Well, I think I'd hand edit myself. That's what I've done in the past. As Bruce say, dispatch-conf (or etc-update is what I use) might pick something up if it's waiting, but looking at the comments in my file I don't think so: mark@c2stable ~ $ cat /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated by the /lib64/udev/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key. # PCI device 0x11ab:0x4364 (sky2) SUBSYSTEM==net, ACTION==add, DRIVERS==?*, ATTR{address}==e0:cb:4e:97:80:fd, ATTR{dev_id}==0x0, ATTR{type}==1, KERNEL==eth*, NAME=eth1 # PCI device 0x11ab:0x4364 (sky2) SUBSYSTEM==net, ACTION==add, DRIVERS==?*, ATTR{address}==e0:cb:4e:97:7a:09, ATTR{dev_id}==0x0, ATTR{type}==1, KERNEL==eth*, NAME=eth0 mark@c2stable ~ $ Really, as long as you don't mess up the format it's really just a matter of matching the macID. Save your old file in a copy somewhere and then edit and make it work. ifconfig will show you the macID. I, like so many others I think, really don't understand how udev manages all this stuff. I'm really not sure udev knows how udev works... HTH, Mark
Re: [gentoo-user] Re: Ethernet Machination
* james wirel...@tampabay.rr.com [130102 16:02]: [..] Well is all works automatically, but udev did not create the files I thought it would upon reboot: rules.d # ls -alg total 12 drwxr-xr-x 2 root 192 Jan 2 14:37 . drwxr-xr-x 4 root 152 Dec 9 23:26 .. -rw-r--r-- 1 root 1896 Sep 30 08:13 70-persistent-cd.rules -rw-r--r-- 1 root 2652 Aug 20 2010 70-persistent-cd.rules.old -rw-r--r-- 1 root 948 Dec 3 03:52 70-persistent-net.rules.31dec2012.old After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Move on, or hand edit the '70-persistent-net.rules' file? TIA, James I don't know what version of udev you're running (sorry if I missed it,) but the udev-186 elog says: Upstream has removed the persistent-net and persistent-cd rules generator. If you need persistent names for these devices, place udev rules for them in /etc/udev/rules.d. That doesn't explain why you got the 70-persistent-cd.rules re-created and not 70-persistent-net.rules, but maybe one of the udev releases I didn't install and that you're running just stopped recreating the 70-persistent-net.rules file but still re-created the 70-persistent-cd.rules file? I went from udev-182-r3 to udev-186 it looks like. Personally if it works without the 70-persistent-net.rules file and you don't plug and unplug Ethernet interfaces (like with USB dongles) then I wouldn't create one myself. Regards, Todd
Re: [gentoo-user] Re: Ethernet Machination
On Wed, Jan 2, 2013 at 2:57 PM, james wirel...@tampabay.rr.com wrote: Mark Knecht markknecht at gmail.com writes: So now that only one ethernet shows up, how do I prevent udev from renaming eth0 to eth3? Probably remove any net-persistent rules that are hanging around. That should free up udev to do more of what you suspect. Yep, I did this to see if udev would build the new rules.. mark at c2stable ~ $ ls -al /etc/udev/rules.d/ total 24 drwxr-xr-x 2 root root 4096 Jan 1 14:40 . drwxr-xr-x 3 root root 4096 Nov 26 17:33 .. -rw-r--r-- 1 root root0 Nov 26 17:31 .keep_sys-fs_udev-0 -rw-r--r-- 1 root root 79 Sep 26 06:19 51-android.rules -rw-r--r-- 1 root root 166 Nov 3 2011 60-ipod.rules -rw-r--r-- 1 root root 1196 May 5 2012 70-persistent-cd.rules -rw-r--r-- 1 root root 627 Nov 26 17:33 70-persistent-net.rules Well is all works automatically, but udev did not create the files I thought it would upon reboot: rules.d # ls -alg total 12 drwxr-xr-x 2 root 192 Jan 2 14:37 . drwxr-xr-x 4 root 152 Dec 9 23:26 .. -rw-r--r-- 1 root 1896 Sep 30 08:13 70-persistent-cd.rules -rw-r--r-- 1 root 2652 Aug 20 2010 70-persistent-cd.rules.old -rw-r--r-- 1 root 948 Dec 3 03:52 70-persistent-net.rules.31dec2012.old After deleting the 70-persistent-net.rule file udev does not re-create it. All is now fine with rc-status only showing net.eth0 which is set up how I like it per /etc/conf.d/net. All services are fine Move on, or hand edit the '70-persistent-net.rules' file? I would move on. The idea is that everything just works. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México
Re: [gentoo-user] Re: Ethernet Machination
On 03/01/13 06:04, Canek Peláez Valdés wrote: On Wed, Jan 2, 2013 at 2:57 PM, james wirel...@tampabay.rr.com wrote: Mark Knecht markknecht at gmail.com writes: ... Also check /lib/udev/rules.d/ BillK