Fix Linux kernel arguments for Grub command line #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses two things:
Before, the code in
80-mkbootable
that generated the Grub command line which finally starts the Linux kernel in a stateful setup, ignored the contents of the variableWWKARGS
as long as the variableCONSOLE
was empty.In fact, the command line was build via
thus people had to specify an additional console other than
tty0
.This threw away even useful kernel arguments such as
net.ifnames=0
oripv6.disable=1
as there was noGRUB_CMDLINE_LINUX
in the file$GRUBDEFAULTCONF
, if one was not aware that an additional console was necessary.Now, kernel arguments are added properly, even if
CONSOLE
is empty, as long asWWKARGS
is not.The latter is usually the case, as the script
80-mkbootable
adds the argumentquiet
as a default value.The kernel expects its arguments to be separated by spaces.
However, the moment the script
80-mkbootable
is executed, the variableWWKARGS
contains the kernel arguments as a comma separated list.This is true, even if the kernel arguments are explicitly specified as separated by spaces while configuring a cluster.
Thus, the function
update_default_grub
did not work properly before.I do not know where the commas are finally added, I just observed that they are there, so the new code strips them away and replaces them with spaces.
Note, however, that this might introduce subtle bugs, where kernel arguments take a comma separated list themselve as a parameter.
I do not know how to solve this, as I can not figure out where
WWKARGS
is populated with commas.Best regards
Wolfgang