From bd5c7be4dac8ed66b326fdf9e978030f20c856f1 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 9 Nov 2026 21:04:06 +0100 Subject: [PATCH] Add interface naming arguments to captured image cmdlines A captured image keeps the /etc/kernel/cmdline of its source. If the source did not run with the net.ifnames=/biosdevname= of the diskless boot, the installed system renames the interface and the connection written during the install does not match. Append them when missing. --- .../el9-diskless/profiles/default/scripts/image2disk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py b/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py index 08b5afca..a35252e0 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py @@ -234,6 +234,11 @@ def fixup(rootdir, vols): newkcmdlineent.append(ent) else: newkcmdlineent.append(ent) + # the network configuration written during the install uses the + # interface names of this boot + for arg in currcmdline: + if arg.startswith(('net.ifnames=', 'biosdevname=')) and arg not in newkcmdlineent: + newkcmdlineent.append(arg) with open(kcmdline, 'w') as kcmdlineout: kcmdlineout.write(' '.join(newkcmdlineent) + '\n') for loadent in glob.glob(os.path.join(rootdir, 'boot/loader/entries/*.conf')):