Skip to content

Conversation

@stephenchengCloud
Copy link
Contributor

@stephenchengCloud stephenchengCloud commented Feb 25, 2025

xcp/bootloader.py/readGrub2 parses the kernel args for each entries in grub.cfg:

elif l.startswith("linux"):
    kernel, kernel_args = (l.split(None, 1)
                           [1].split(None, 1))

Missing args will result in an error.

Added args to make it the same as in XS9 host:/boot/efi/EFi/xenserver/grub.cfg

+++++++++++++++++++++++++++
Updated:
Removed invalid arguments from memtest86+, and raised another PR to handle the case of an entry with no additional arguments

liulinC
liulinC previously approved these changes Feb 25, 2025

menuentry "memtest" {
linux /boot/memtest86+x64.efi
linux /boot/memtest86+x64.efi console=tty0 console=hvc0
Copy link
Contributor

Choose a reason for hiding this comment

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

These are not valid memtest86+ arguments. Wouldn't it be better to fix the parsing code to handle the case of an entry with no additional arguments?

(memtest86+ does accept console arguments but the format is slightly different according to the docs I can find.)

Copy link
Contributor Author

@stephenchengCloud stephenchengCloud Feb 27, 2025

Choose a reason for hiding this comment

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

I copied the args from XS9 host:/boot/efi/EFI/xenserver/grub.cfg
So we need also to remove the args from this gurb.cfg on host.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rasied another PR in python-libs repo.
@liulinC @rosslagerwall @GeraldEV Could you please review it?
xenserver/python-libs#153

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use this PR to remove invalid arguments from memtest86+.

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
@stephenchengCloud stephenchengCloud changed the title CA-407115: Add args for memtest entry in grub.cfg CA-407115: Remove invalid arguments from memtest86+ Feb 28, 2025
@stephenchengCloud stephenchengCloud force-pushed the private/stephenche/CA-407115 branch from b5b0cee to 318bd87 Compare February 28, 2025 06:06
@stephenchengCloud stephenchengCloud merged commit d90bcd1 into master Mar 3, 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.

3 participants