Advertisement
Guest User

udev update

a guest
Apr 26th, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. If you choose to modify them, you must use free namespace (like net*
  2. or internet*) instead of kernel namespace (like eth* or wlan*)
  3. because in-place renaming has been deprecated, see small
  4. documentation of it if you like[2].
  5.  
  6. The file 70-persistent-net.rules, like the 70-persistent-cd.rules
  7. should be removed, so if you modify, rename the file also to something
  8. else like 70-my-network.rules to silence the deprecation warning coming
  9. from the end of the sys-fs/udev emerge.
  10.  
  11. This is the old format with reserved namespace:
  12.  
  13. SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"
  14. SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="yy:yy:yy:yy:yy:yy", NAME="eth1"
  15.  
  16. This is the new format with free namespace:
  17.  
  18. SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="net0"
  19. SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="yy:yy:yy:yy:yy:yy", NAME="net1"
  20.  
  21. 4. predictable network interface names:
  22.  
  23. If /etc/udev/rules.d/80-net-name-slot.rules is an empty file or a
  24. symlink to /dev/null, the new names will be disabled and the kernel will
  25. do all the interface naming, and the resulting names may vary by kernel
  26. configuration, hardware configuration and kernel version.
  27.  
  28. Also, the forementioned old 70-persistent-net.rules might interfere with
  29. the new predictable interface names.
  30.  
  31. You can get attributes of your network interfaces using a command like
  32. the following (replace eth0 with the name of the appropriate interface):
  33.  
  34. # udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null
  35.  
  36. You can copy /lib/udev/rules.d/80-net-name-slot.rules to
  37. /etc/udev/rules.d and specify the attributes and in which order
  38. they will be used for naming. See upstream wiki[3] for detailed list
  39. of options.
  40.  
  41. You can prepare the system for the new names before booting for example
  42. by renaming /etc/init.d/net.* symlinks, editing /etc/conf.d/net, etc.
  43.  
  44. The feature can also be completely disabled using net.ifnames=0 on the
  45. kernel command line.
  46.  
  47. If you only have one interface card, you don't necessarily have much
  48. use for this feature as the name almost always stays at eth0, you can
  49. easily disable it using forementioned methods.
  50.  
  51. This feature can also replace the functionality of sys-apps/biosdevname,
  52. but you can still keep using it if you want.
  53.  
  54. In a normal new installation there are no files in /etc/udev/rules.d
  55. and if you haven't edited any files you have in there, you should most
  56. likely backup and delete them all if they don't belong to any packages.
  57.  
  58. The official wiki has a dedicated page for udev upgrade notes[4].
  59.  
  60. [1] http://www.gentoo.org/doc/en/udev-guide.xml
  61. [2] http://www.kernel.org/doc/htmldocs/device-drivers/API-device-rename.html
  62. [3] http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
  63. [4] http://wiki.gentoo.org/wiki/Udev/upgrade
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement