On 11/27/19 12:39 PM, Bill Shirley wrote:
I don't run FC31 but on all my other Fedora systems, I add
net.ifnames=0
to the kernel
command line /etc/default/grub:
GRUB_CMDLINE_LINUX="rd.md.uuid=41012be5:1df005d4:cfee0bd3:e112219a
*net.ifnames=0* rd.shell rd.timeout=65 consoleblank=600 rcu_nocbs=0-15"
Then regenerate the grub menu:
# legacy BIOS
grub2-mkconfig -o /boot/grub2/grub.cfg
I don' have but one EFI server:
# EFI BIOS
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Bill
On 11/27/2019 10:42 AM, sean darcy wrote:
> On 11/27/19 8:09 AM, Roberto Ragusa wrote:
>> On 2019-11-26 19:58, Sean Darcy wrote:
>>
>>> On boot:
>>> kernel: asix 2-3:1.0 eth0: register 'asix' at usb-0000:00:14.0-3,
ASIX
>>> AX88772 USB 2.0 Ethernet, 00:0e:c6:dc:01:aa
>>> kernel: usbcore: registered new interface driver asix
>>> kernel: asix 2-3:1.0 enp0s20u3: renamed from eth0
>>>
>>> then I unplug and plug:
>>> kernel: asix 2-3:1.0 internal: renamed from enp0s20u3
>>> kernel: asix 2-3:1.0 internal: link up, 100Mbps, full-duplex, lpa
>>> 0x45E1
>>>
>>> That does not happen if I plug and unplug external, an ethernet cable.
>>>
>>> BUT, what's really odd. I'm booting the Fc31 kernel:
>>>
>>> kernel-5.3.11-300.fc31.x86_64
>>>
>>> if I boot the same kernel, but FC30:
>>>
>>> kernel-5.3.11-200.fc30.x86_64
>>>
>>> IT WORKS !!
>>>
>>> Any help appreciated.
>> I've seen the same issue some time ago (but on Centos 7).
>> The basic problem is that interface renaming must happen correctly
>> in the initramfs, where you have to be sure the network configuration
>> is fine;
>> that explains why a successive unplug/replug works.
>> In my case there was no NetworkManager involved, just the old
>> "service network start"
>> things, with configs in /etc/sysconfig/network-scripts/ifcfg*
>> No idea what can have happened between those two kernels, apart
>> from indeed having different intiramfs content.
>> You should try extracting the two initramfs and doing a comparison.
>> Something like:
>>
>> [root@router boot]# cat z_decompress.sh
>> #!/bin/bash
>>
>> set -e
>>
>> initramfs=$1
>> /usr/lib/dracut/skipcpio $initramfs >z_decomp_$initramfs.cpio.gz
>> rm -Rf z_dir_$initramfs
>> mkdir z_dir_$initramfs
>> cd z_dir_$initramfs
>> gunzip <../z_decomp_$initramfs.cpio.gz | cpio -i
>>
>> Best regards.
>>
>
> Thanks, but that's beyond my kernel skill set.
>
> Here's what I tried, all without success:
>
>
> 1. put 2 .link files is /etc/systemd/network
>
> ls /etc/systemd/network
> 10-external.link 10-internal.link
> cat /etc/systemd/network/*
> [Match]
> MACAddress=50:7b:9d:0b:8a:ab
>
> [Link]
> Name=external
> [Match]
> MACAddress=00:0e:c6:dc:01:aa
>
> [Link]
> Name=internal
>
>
> 2. put 70-persistent-net.rule in /etc/udev/rules.d
>
> cat /etc/udev/rules.d/70-persistent-net.rules
> SUBSYSTEM=="net", ACTION=="add",
ATTR{address}=="50:7b:9d:0b:8a:ab",
> NAME="external"
> SUBSYSTEM=="net", ACTION=="add",
ATTR{address}=="00:0e:c6:dc:01:aa",
> NAME="internal"
>
> rebooted
>
> One odd result of running udevadm test on the "external" interface:
>
> enp1s0: Failed to rename network interface 2 from 'enp1s0' to
> 'external': Device or resource busy
>
> There must be some trick here that I'm missing. What's the problem
> with the FC31 kernel ?
>
> sean
I tried net.ifnames=0. That resulted in interface names eth0 and eth1.
And did not honor the persistent name request.
udevadm finds the 10-external.link file :
SYSTEMD_LOG_LEVEL=debug udevadm test-builtin net_setup_link
/sys/class/net/eth0
Successfully loaded SELinux database in 1.572ms, size on heap is 331K.
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
=== trie on-disk ===
tool version: 243
file size: 9955651 bytes
header size 80 bytes
strings 2118107 bytes
nodes 7837464 bytes
Load module index
Found container virtualization none.
Network interface NamePolicy= disabled on kernel command line, ignoring.
timestamp of '/etc/systemd/network' changed
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/10-internal.link
Parsed configuration file /etc/systemd/network/10-external.link
Created link configuration context.
ID_NET_DRIVER=r8169
eth0: Config file /etc/systemd/network/10-external.link is applied
ethtool: autonegotiation is unset or enabled, the speed and duplex are
not writable.
eth0: Failed to query name_assign_type: Invalid argument
eth0: Policies didn't yield a name, using specified Name=external.
ID_NET_LINK_FILE=/etc/systemd/network/10-external.link
ID_NET_NAME=external
Unload module index
Unloaded link configuration context.
but still the interface name is not changed!
sean