Altering install iso to enabled mac base naming for nic's

hi all

I want to create /etc/systemd/network/99-default.link on the install ISO with the following
"

[Match]
OriginalName=*

[Link]
NamePolicy=mac
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=none
"

this works post boot but am wanting to look at how I can get this naming on the boot process
so the nics during install will have the same naming as post installation.

how do I go about it am assuming i need to change install.img ?

The initrd.img contains usr/lib/systemd/network/99-default.link
Adding custom etc/systemd/network/99-default.link to that image should override the default.

I do faintly recall – from more than a decade ago – unpacking and repacking initrd.img. Not sure whether it had same format as used today.


Where do you need the names?
When/if installer does generate stored NetworkManager connections for interfaces, it does bind those connections with 802-3-ethernet.mac-address, not with connection.interface-name (the ifname that we have to use on manual nmcli con add).

am going to be dynamically generating kickstarts from netbox data in kvm instances with multiple interfaces but there is no DHCP in some cases and as such I want to ensure when we pass details into the iso for the IP we have clean names and not having files binding different names that can change with a KVM adjustment as that cause some issue when SD nics have been removed. with network manager refusing to start interfaces or the interfaces have not be named as expected during the install process. especially on dell system which use a bios naming