Skip to content

Conversation

@ydirson
Copy link
Contributor

@ydirson ydirson commented Jan 14, 2026

In distros like Almalinux 10, GRUB modules are installed in /usr/lib/grub in the rootfs. For GRUB to find them, a proper prefix has to be set, which we can identify using its UUID.

This patch adds a new optional attribute to Bootloader object for this, which is a dict with two keys:

  • uuid: the UUID of the rootfs
  • path: the directory in the rootfs where modules will be searched for

This is meant to be usable by host-installer in relevant contexts.

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
xcp/bootloader.py 50.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #185     +/-   ##
========================================
- Coverage    83.6%   83.6%   -0.1%     
========================================
  Files          23      23             
  Lines        3368    3372      +4     
========================================
+ Hits         2817    2819      +2     
- Misses        551     553      +2     
Files with missing lines Coverage Δ
xcp/bootloader.py 93.2% <50.0%> (-0.6%) ⬇️

In distros like Almalinux 10, GRUB modules are installed in
/usr/lib/grub in the rootfs. For GRUB to find them, a proper prefix has to
be set, which we can identify using its UUID.

This patch adds a new optional attribute to `Bootloader` object for
this, which is a `dict` with two keys:

- `uuid`: the UUID of the rootfs
- `path`: the directory in the rootfs where modules will be searched for

This is meant to be usable by host-installer in relevant contexts.

Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
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.

1 participant