From 20a6d5cab94b2b027d97ff98ec2e9dd7c5081308 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 3 Nov 2026 21:31:11 +0100 Subject: [PATCH] Point out kernel arguments for captured profiles A diskless boot of a captured profile only gets the profile's kernelargs, not the kernel arguments of the source. Sources relying on some, such as net.ifnames=0 for their interface names, then came up with different interface names than the source and an install to disk of the same image. Say so in the generated profile.yaml and after the capture, and end the file with a newline so appended settings do not run into the kernelargs line. --- imgutil/imgutil | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index f7a19ce3..2bdac393 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -285,12 +285,16 @@ def capture_remote(args): label = '{0} {1} ({2})'.format(finfo['name'], finfo['version'], profname) with open(os.path.join(outdir, 'profile.yaml'), 'w') as profileout: profileout.write('label: {}\n'.format(label)) - profileout.write('kernelargs: quiet installtodisk # remove installtodisk to boot stateless') + profileout.write('kernelargs: quiet installtodisk # remove installtodisk to boot stateless\n') + profileout.write('# A diskless boot only gets the kernelargs above, not the kernel arguments\n' + '# of the source. Add those it relies on and run osdeploy updateboot.\n') subprocess.check_call(['chmod', 'o+r,go-w,a-t', '-R', outdir]) subprocess.check_call(['chown', '-R', 'confluent', outdir]) sys.stdout.write('Updating boot image... ') sys.stdout.flush() subprocess.check_call(['osdeploy', 'updateboot', profname]) + print('Note: a diskless boot of {0} only gets the kernelargs in {1}, add kernel ' + 'arguments of the source it relies on there'.format(profname, os.path.join(outdir, 'profile.yaml'))) def capture_system():