Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding net.ifnames=0 to image-factory extra kernel arguments is not being respected #8008

Closed
budimanjojo opened this issue Nov 30, 2023 · 8 comments

Comments

@budimanjojo
Copy link
Contributor

Bug Report

I tried a fresh install in a VM with only net.ifnames=0 extra kernel command-line args using image-factory and it gives me factory.talos.dev/installer/6905bc709e5947573a4ec2d11723b58882936d3d0e15c708f7d78f0c689684a5:v1.5.5 installer URL.
I put that into machine config and do talosctl apply-config --insecure into the machine, did a talosctl bootstrap and then talosctl get addresses after it finishes. The result shows enx56e63648f898 as the interface name instead of eth0.

I'm not sure if this only happens for net.ifnames=0 or all kernel arguments.

@frezbo
Copy link
Member

frezbo commented Nov 30, 2023

This is expected, since these only gets added for iso or pxe boot, needs to add the same in machine.install.extraKernelArgs

@budimanjojo
Copy link
Contributor Author

So kernel args are useless for install image?

If I'm booting from an iso image downloaded from the image-factory with the kernel args, then do installation without specifying machine.install.extraKernelArgs, does that kernel args also got deleted on reboot?

@frezbo
Copy link
Member

frezbo commented Nov 30, 2023

If I'm booting from an iso image downloaded from the image-factory with the kernel args, then do installation without specifying machine.install.extraKernelArgs

I believe it should preserve

@budimanjojo
Copy link
Contributor Author

This makes it even weirder if the kernel arguments in the downloaded ISO is permanent and can't be removed/changed.
Is it really the intended behavior and not something that should be improved?
a. If I download the ISO from the github releases (bare iso without any extension and kernel args), then I use the image-factory generated installer to install Talos to the machine and expecting the image will enable the kernel arguments I specify in the image-factory.
b. If I download the ISO from image-factory with the kernel arguments I wanted at the moment, I can't remove it in the future unless I boot from a brand new ISO image.

@frezbo
Copy link
Member

frezbo commented Nov 30, 2023

This makes it even weirder if the kernel arguments in the downloaded ISO is permanent and can't be removed/changed.

net.ifnames get special treatment, it's one of the ones that gets preserved. Other's gets dropped:

For what it's worth, these are the only ones that gets preserved:

  • siderolink.api
  • talos.events.sink
  • talos.logging.kernel
  • em.events_url
  • talos.dashboard.disabled
  • net.ifnames

For a -> installer never will have any kernel arguments, if you'd need extra that needs to be part of machine config

For b -> Starting with Talos 1.6 we support removing kernel args with -<key> for removing all and -<key>=<value> to remove an exact one

@budimanjojo
Copy link
Contributor Author

thanks! this is clear now. I'll close this issue.

@smira
Copy link
Member

smira commented Nov 30, 2023

The fact that installer ignores extra args is documented here: https://www.talos.dev/v1.5/learn-more/image-factory/#restrictions

Image Factory still accepts a schematic with extra args for an installer, so that you can use same schematic say for ISO and installer, this way ISO captures initial boot args, and installer later on doesn't touch it. (So that there's no need to create a separate schematic for an installer).

To add some more confusion to the issue, SecureBoot installer actually accepts extra args, as they are part of the signed payload of the boot asset, and install.extraKernelArgs is ignored in SecureBoot mode.

@budimanjojo
Copy link
Contributor Author

@smira thanks for the explaination.This is indeed really confusing. 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants