Predictable network interface names with read-only diskless system

Hi,

first of all thanks for bringing Rocky to life and all the fantastic work you do!

I’m preparing a stateless diskless installation with Rocky, i.e. a read-only nfsroot (not sure this is relevant though).
Almost everything is working fine to our needs - yet, I can’t get predictable network interface naming to work.

The journal says:

Mar 18 00:38:28 systemd-udevd[618]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 18 00:38:28 systemd-udevd[618]: Error changing net interface name ‘eth0’ to ‘enp3s0’: Device or resource busy
Mar 18 00:38:28 systemd-udevd[618]: could not rename interface ‘2’ from ‘eth0’ to ‘enp3s0’: Device or resource busy

Do I have to adapt the initramfs configuration?
Currently, I’m only doing:

dracut --no-hostonly --nolvmconf -m “nfs network base” --xz /boot/initramfs.pxe-4.18.0-348.20.1.rt7.150.el8_5.x86_64 4.18.0-348.20.1.rt7.150.el8_5.x86_64

Thanks in advance!

Any ideas how I can try to debug that?

Adding systemd, systemd-initrd and dracut-systemd modules to the dracut build call fixed the issue.
That way the interface is renamed in the initrd stage before switching root.

I didn’t considered that as it was not necessary for RHEL 7.