Udev अपडेट के बाद, नई नीति काम क्यों नहीं करती है


0

मैंने अपने सिस्टम में udev (ubuntu server 14.04 on VM) को 204-5ubuntu20.18 संस्करण में अपडेट किया है। रिबूट प्रणाली के बाद, एनआईसी का कोई नाम नहीं है। नाम नैतिक हैं *। निर्देशिका में /lib/udev/rules.d/ कोई फ़ाइल 80-नेट-नेम-स्लॉट नहीं है। नई नीति क्यों नहीं है? और क्या करने की जरूरत है?

# 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

क्या आप virtio network का उपयोग कर रहे हैं? क्या करता है udevadm info /sys/class/net/eth0 शो, साथ ही साथ sudo udevadm test-builtin net_id /sys/class/net/eth0 तथा sudo udevadm test /sys/class/net/eth0?
grawity

जवाबों:


0

2014 में पुण्य उपकरणों के लिए "प्रिडिक्टेबल" नामकरण हटा दिया गया था, क्योंकि यह नहीं था वास्तव में पूर्वानुमेय (IIRC, विशेष रूप से इसे हटाने के लिए कहा गया है)

2015 के अंत में इसे फिर से जोड़ा गया (एक अधिक विश्वसनीय विधि का उपयोग करके), लेकिन मुझे संदेह है कि उबंटू एलटीएस में उस सुविधा को वापस कर देगा।


शायद। लेकिन फ़ाइल 80-नेट-नेम-स्लॉट क्यों है। /lib/udev/rules.d/ में मौजूद नहीं है? और मैंने डिवाइस "e1000" को जोड़ा, सिस्टम में यह eth1 के रूप में दिखाई देता है।
Fanton

जोड़ा गया कर्नेल पैरामीटर: # cat / proc / cmdline BOOT_IMAGE = / vmlinuz-3.16.0-30-जेनेरिक रूट = / dev / mapper / Left - vg-root ro net.ifnames = 1 नाम कोई परिवर्तन नहीं है।
Fanton

यह नहीं बदलेगा, क्योंकि net.ifnames=1 पहले से ही डिफ़ॉल्ट है ... लेकिन udev नियमों के लिए, क्या अन्य 80-* आपके पास फाइलें हैं? एक बार इसका नाम बदल दिया गया।
grawity

केवल 80-ड्राइवर
Fanton
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.