0

I have updated udev in my system (ubuntu server 14.04 on VM) to version 204-5ubuntu20.18. After reboot system, NIC's no renames by predictable names. Names are eth*. In directory /lib/udev/rules.d/ is no file 80-net-name-slot.rules. Why not works new policy? What need to do else?

# dpkg -s udev
Package: udev
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 5151
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Source: systemd
Version: 204-5ubuntu20.18
Replaces: systemd-services (<< 202-0ubuntu6)
Depends: libacl1 (>= 2.2.51-8), libblkid1 (>= 2.19.1), libc6 (>= 2.17), libcgmanager0, libdbus-1-3 (>= 1.0.2), libkmod2 (>= 5~), libnih-dbus1 (>= 1.0.0), libnih1 (>= 1.0.0), libselinux1 (>= 2.0.65), libudev1 (= 204-5ubuntu20.18), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), lsb-base (>= 3.0-6), util-linux (>= 2.16), procps

# udevadm info /sys/class/net/eth0
P: /devices/pci0000:00/0000:00:03.0/virtio0/net/eth0
E: DEVPATH=/devices/pci0000:00/0000:00:03.0/virtio0/net/eth0
E: ID_BUS=pci
E: ID_MODEL_FROM_DATABASE=Virtio network device
E: ID_MODEL_ID=0x1000
E: ID_NET_NAME_MAC=enx52540044f6c0
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
E: ID_VENDOR_FROM_DATABASE=Red Hat, Inc
E: ID_VENDOR_ID=0x1af4
E: IFINDEX=2
E: INTERFACE=eth0
E: MATCHDEVID=0x0
E: MATCHIFTYPE=1
E: SUBSYSTEM=net
E: USEC_INITIALIZED=628

# udevadm test-builtin net_id /sys/class/net/eth0
calling: test-builtin
=== trie on-disk ===
tool version:          204
file size:         5662556 bytes
header size             80 bytes
strings            1265740 bytes
nodes              4396736 bytes
load module index
ID_NET_NAME_MAC=enx52540044f6c0
unload module index

# udevadm test /sys/class/net/eth0
calling: test
version 204
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

=== trie on-disk ===
tool version:          204
file size:         5662556 bytes
header size             80 bytes
strings            1265740 bytes
nodes              4396736 bytes
load module index
read rules file: /lib/udev/rules.d/40-crda.rules
read rules file: /lib/udev/rules.d/40-gnupg.rules
read rules file: /lib/udev/rules.d/40-hyperv-hotadd.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
read rules file: /lib/udev/rules.d/50-firmware.rules
read rules file: /lib/udev/rules.d/50-udev-default.rules
read rules file: /lib/udev/rules.d/55-dm.rules
read rules file: /lib/udev/rules.d/56-lvm.rules
read rules file: /lib/udev/rules.d/60-cdrom_id.rules
read rules file: /lib/udev/rules.d/60-keyboard.rules
read rules file: /lib/udev/rules.d/60-persistent-alsa.rules
read rules file: /lib/udev/rules.d/60-persistent-input.rules
read rules file: /lib/udev/rules.d/60-persistent-serial.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
read rules file: /lib/udev/rules.d/60-persistent-storage.rules
read rules file: /lib/udev/rules.d/60-persistent-v4l.rules
read rules file: /lib/udev/rules.d/61-accelerometer.rules
read rules file: /lib/udev/rules.d/62-google-cloudimg.rules
read rules file: /lib/udev/rules.d/64-btrfs.rules
read rules file: /lib/udev/rules.d/70-power-switch.rules
read rules file: /lib/udev/rules.d/70-uaccess.rules
read rules file: /lib/udev/rules.d/71-biosdevname.rules
read rules file: /lib/udev/rules.d/71-seat.rules
read rules file: /lib/udev/rules.d/73-idrac.rules
read rules file: /lib/udev/rules.d/73-seat-late.rules
read rules file: /lib/udev/rules.d/75-net-description.rules
read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules
read rules file: /lib/udev/rules.d/75-probe_mtd.rules
read rules file: /lib/udev/rules.d/75-tty-description.rules
read rules file: /lib/udev/rules.d/78-graphics-card.rules
read rules file: /lib/udev/rules.d/78-sound-card.rules
read rules file: /lib/udev/rules.d/80-drivers.rules
read rules file: /lib/udev/rules.d/85-hdparm.rules
read rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
read rules file: /lib/udev/rules.d/85-lvm2.rules
read rules file: /lib/udev/rules.d/85-regulatory.rules
read rules file: /lib/udev/rules.d/95-udev-late.rules
rules contain 24576 bytes tokens (2048 * 12 bytes), 11594 bytes strings
1839 strings (22502 bytes), 1197 de-duplicated (11551 bytes), 643 trie nodes used
PROGRAM '/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i eth0' /lib/udev/rules.d/71-biosdevname.rules:21
starting '/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i eth0'
'/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i eth0' [7226] exit with return code 4
IMPORT builtin 'net_id' /lib/udev/rules.d/75-net-description.rules:6
IMPORT builtin 'hwdb' /lib/udev/rules.d/75-net-description.rules:12
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:03.0/virtio0/net/eth0
ID_BUS=pci
ID_MODEL_FROM_DATABASE=Virtio network device
ID_MODEL_ID=0x1000
ID_NET_NAME_MAC=enx52540044f6c0
ID_PCI_CLASS_FROM_DATABASE=Network controller
ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
ID_VENDOR_FROM_DATABASE=Red Hat, Inc
ID_VENDOR_ID=0x1af4
IFINDEX=2
INTERFACE=eth0
MATCHDEVID=0x0
MATCHIFTYPE=1
SUBSYSTEM=net
USEC_INITIALIZED=628
unload module index


# udevadm info /sys/class/net/eth1
P: /devices/pci0000:00/0000:00:09.0/net/eth1
E: DEVPATH=/devices/pci0000:00/0000:00:09.0/net/eth1
E: ID_BUS=pci
E: ID_MODEL_FROM_DATABASE=82540EM Gigabit Ethernet Controller
E: ID_MODEL_ID=0x100e
E: ID_NET_NAME_MAC=enx525400b5f547
E: ID_NET_NAME_PATH=enp0s9
E: ID_NET_NAME_SLOT=ens9
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: ID_VENDOR_ID=0x8086
E: IFINDEX=3
E: INTERFACE=eth1
E: SUBSYSTEM=net
E: USEC_INITIALIZED=54306
E: net.ifnames=1

# udevadm test-builtin net_id /sys/class/net/eth1
calling: test-builtin
=== trie on-disk ===
tool version:          204
file size:         5662556 bytes
header size             80 bytes
strings            1265740 bytes
nodes              4396736 bytes
load module index
ID_NET_NAME_MAC=enx525400b5f547
ID_NET_NAME_PATH=enp0s9
ID_NET_NAME_SLOT=ens9
unload module index

# udevadm test /sys/class/net/eth1
calling: test
version 204
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

=== trie on-disk ===
tool version:          204
file size:         5662556 bytes
header size             80 bytes
strings            1265740 bytes
nodes              4396736 bytes
load module index
read rules file: /lib/udev/rules.d/40-crda.rules
read rules file: /lib/udev/rules.d/40-gnupg.rules
read rules file: /lib/udev/rules.d/40-hyperv-hotadd.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
read rules file: /lib/udev/rules.d/50-firmware.rules
read rules file: /lib/udev/rules.d/50-udev-default.rules
read rules file: /lib/udev/rules.d/55-dm.rules
read rules file: /lib/udev/rules.d/56-lvm.rules
read rules file: /lib/udev/rules.d/60-cdrom_id.rules
read rules file: /lib/udev/rules.d/60-keyboard.rules
read rules file: /lib/udev/rules.d/60-persistent-alsa.rules
read rules file: /lib/udev/rules.d/60-persistent-input.rules
read rules file: /lib/udev/rules.d/60-persistent-serial.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
read rules file: /lib/udev/rules.d/60-persistent-storage.rules
read rules file: /lib/udev/rules.d/60-persistent-v4l.rules
read rules file: /lib/udev/rules.d/61-accelerometer.rules
read rules file: /lib/udev/rules.d/62-google-cloudimg.rules
read rules file: /lib/udev/rules.d/64-btrfs.rules
read rules file: /lib/udev/rules.d/70-power-switch.rules
read rules file: /lib/udev/rules.d/70-uaccess.rules
read rules file: /lib/udev/rules.d/71-biosdevname.rules
read rules file: /lib/udev/rules.d/71-seat.rules
read rules file: /lib/udev/rules.d/73-idrac.rules
read rules file: /lib/udev/rules.d/73-seat-late.rules
read rules file: /lib/udev/rules.d/75-net-description.rules
read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules
read rules file: /lib/udev/rules.d/75-probe_mtd.rules
read rules file: /lib/udev/rules.d/75-tty-description.rules
read rules file: /lib/udev/rules.d/78-graphics-card.rules
read rules file: /lib/udev/rules.d/78-sound-card.rules
read rules file: /lib/udev/rules.d/80-drivers.rules
read rules file: /lib/udev/rules.d/85-hdparm.rules
read rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
read rules file: /lib/udev/rules.d/85-lvm2.rules
read rules file: /lib/udev/rules.d/85-regulatory.rules
read rules file: /lib/udev/rules.d/95-udev-late.rules
rules contain 24576 bytes tokens (2048 * 12 bytes), 11594 bytes strings
1839 strings (22502 bytes), 1197 de-duplicated (11551 bytes), 643 trie nodes used
PROGRAM '/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i eth1' /lib/udev/rules.d/71-biosdevname.rules:21
starting '/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i eth1'
'/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i eth1' [1135] exit with return code 4
IMPORT builtin 'net_id' /lib/udev/rules.d/75-net-description.rules:6
IMPORT builtin 'hwdb' /lib/udev/rules.d/75-net-description.rules:12
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:09.0/net/eth1
ID_BUS=pci
ID_MODEL_FROM_DATABASE=82540EM Gigabit Ethernet Controller
ID_MODEL_ID=0x100e
ID_NET_NAME_MAC=enx525400b5f547
ID_NET_NAME_PATH=enp0s9
ID_NET_NAME_SLOT=ens9
ID_PCI_CLASS_FROM_DATABASE=Network controller
ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
ID_VENDOR_FROM_DATABASE=Intel Corporation
ID_VENDOR_ID=0x8086
IFINDEX=3
INTERFACE=eth1
SUBSYSTEM=net
USEC_INITIALIZED=54306
net.ifnames=1
unload module index
1
  • Are you using virtio network? What does udevadm info /sys/class/net/eth0 show, as well as sudo udevadm test-builtin net_id /sys/class/net/eth0 and sudo udevadm test /sys/class/net/eth0? – user1686 Mar 16 '16 at 13:09
0

"Predictable" naming for virtio devices was removed in 2014, since it wasn't actually predictable (IIRC, the virtio maintainer specifically asked for it to be removed).

It was re-added in late 2015 (using a more reliable method), but I doubt Ubuntu will backport that feature to LTS.

4
  • May be. But why file 80-net-name-slot.rules is not present in /lib/udev/rules.d/ ? And I added device "e1000", in system it appear as eth1. – Fanton Mar 16 '16 at 15:17
  • Added kernel parameter: # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.16.0-30-generic root=/dev/mapper/Left--vg-root ro net.ifnames=1 Name is no change. – Fanton Mar 16 '16 at 15:56
  • It won't change, because net.ifnames=1 is already the default... But as for udev rules, what other 80-* files do you have? It was renamed once. – user1686 Mar 17 '16 at 5:35
  • only 80-drivers.rules – Fanton Mar 17 '16 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.