Skip to content

Conversation

@rosslagerwall
Copy link
Contributor

No description provided.

When reading a GRUB2 config, parse the baud rate as an int for
consistency with the other bootloader types.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
extlinux and GRUB1 are no longer used for installed systems so remove
the code that handles them.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
@rosslagerwall
Copy link
Contributor Author

See related xenserver/host-installer#285

I've tested this on XS8 and XS9 (along with the installer PR).

tboot is no longer supported so remove the code that handles it.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
GRUB2 will fail if module2 is used without a previous call to
multiboot2 so raise an exception instead of pretending that it is
actually a hypervisor.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Fail when parsing a menu entry that specifies an initrd without a
preceding kernel since it is invalid according to GRUB2.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
@rosslagerwall
Copy link
Contributor Author

I've updated to avoid changing the existing API or adding additional arguments to MenuEntry.
I've also fixed some new and pre-existing failures so hopefully the checks are successful.

@coveralls
Copy link

coveralls commented Jul 29, 2025

Pull Request Test Coverage Report for Build 16600186376

Details

  • 34 of 34 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.6%) to 82.649%

Totals Coverage Status
Change from base Build 14919800856: -0.6%
Covered Lines: 2615
Relevant Lines: 3164

💛 - Coveralls

@rosslagerwall
Copy link
Contributor Author

Note that the coverage % decreased because I removed code that was covered. Since all new/changed code is covered in this PR, it shouldn't block merging the PR.

@freddy77
Copy link
Contributor

Note that the coverage % decreased because I removed code that was covered. Since all new/changed code is covered in this PR, it shouldn't block merging the PR.

yes, the percentage decreased but the lines increased

A GRUB2 menu entry may boot different OSes using different loaders.

Add a new menu entry parameter to allow specifying the entry type:

1) multiboot2 - used for booting xen.gz
2) linux - used for booting native Linux
3) xen_boot - used for booting xen.efi, newly introduced here

The entry type can be specified when first creating the menu entry
(defaulting to multiboot2) and it is subsequently maintained when
reading/writing the config file.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
This test is broken in multiple ways. Either:

1) Execution of diff races against the named temporary file being
removed when the context manager is left, resulting in no output from
diff and the test "passes" (diff exits with status 2).

2) diff generates output and the call to assertRegexpMatches() fails
   because it was renamed in Python 3.2.

Fix this by ensuring diff finishes before leaving the context manager,
asserting the exact diff expected, and checking the return code.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Ignore the warning about too many positional arguments since this is
part of the existing API.
Clean up trailing whitespace.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
@rosslagerwall rosslagerwall merged commit 0765a56 into xenserver:master Jul 31, 2025
4 of 5 checks passed
@rosslagerwall rosslagerwall deleted the private/rossla/efi branch July 31, 2025 11:11
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