Skip to content

Conversation

@lslezak
Copy link
Contributor

@lslezak lslezak commented Apr 24, 2025

Problem

Solution

  • Enhance the filtering code to ignore the specific PXE boot parameters
  • Remove also most of the network settings

Testing

  • The unit test has been updated
  • Tested manually

Screenshots

After booting the installer via PXE the extra parameters can be seen in the /proc/cmdline file. But the /run/agama/cmdline.d/kernel.conf does not include them and the journal log shows they were ignored:
agama-boot-params

After booting the installed system no PXE boot option is present on the linux line:
agama-boot-params-installed

- Do not pass them to the installed system
- Remove also most of the network settings
- gh##2280
@@ -1 +1 @@
BOOT_IMAGE=/boot/vmlinuz splash=silent mitigations=auto quiet nosimplefb=1 No newline at end of file
splash=silent mitigations=auto quiet nosimplefb=1 No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, to be sure I would enhance test with various parameters we are using like some rd.kiwi params and some oh others which are more tricky to be sure that regexp matching

@lslezak
Copy link
Contributor Author

lslezak commented Apr 25, 2025

BTW using spaces in parameters does not work properly. e.g. initrd="/boot/ /initrd" is not processed correctly.

We use a simple shell word splitting functionality, for proper parsing we would need to write our full parser and process the input character by character. That's not trivial and then we would probably need to fix all code which uses the processed /run/agama/cmdline.d/kernel.conf file.

Using spaces or newlines in file names usually causes troubles. I'd keep it as it is and fix it only when we get a real use case for this scenario.

Copy link
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lslezak lslezak merged commit 3e5ac5d into master Apr 25, 2025
8 checks passed
@lslezak lslezak deleted the clean_boot_params branch April 25, 2025 13:09
@imobachgs imobachgs mentioned this pull request May 26, 2025
imobachgs added a commit that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants