Skip to content

feature: Fully enable non-default ESP paths#595

Merged
frhuelsz merged 5 commits into
mainfrom
user/frhuelsz/efi-path-all-items
Apr 10, 2026
Merged

feature: Fully enable non-default ESP paths#595
frhuelsz merged 5 commits into
mainfrom
user/frhuelsz/efi-path-all-items

Conversation

@frhuelsz
Copy link
Copy Markdown
Contributor

🔍 Description

Final PR in the series to allow for non-default ESP paths. This one gets rids of the last couple of usages of the ESP mount point path constants.

It also renames them and adds a doc comment about not using them in product code. The only remaing places where they are used:

  • In HC parsing, when default behavior is desired. (only product code instance)
  • In tests.
  • In sample HC files.

@frhuelsz frhuelsz requested a review from a team as a code owner April 10, 2026 19:04
Copilot AI review requested due to automatic review settings April 10, 2026 19:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Enables non-default ESP mount paths by removing remaining hard-coded ESP path constants from product code paths and pivoting to using the runtime ESP mount path from context / Host Status.

Changes:

  • Renames ESP path constants to DEFAULT_* variants and updates samples/tests/docs to use the renamed constants.
  • Updates ESP path construction in subsystems/engine code to use ctx.esp_mount_path (and derived Host Status values) instead of compile-time constants.
  • Updates offline-init logic to discover ESP mount path from Host Status rather than assuming /boot/efi.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
report/esp-constant-usages.md Updates the tracking report to reflect remaining/default-only constant usages.
crates/trident_api/src/samples/sample_hc.rs Updates sample HC mounts to use DEFAULT_ESP_MOUNT_POINT_PATH.
crates/trident_api/src/constants.rs Renames ESP constants to DEFAULT_* and adds “do not use” doc warnings.
crates/trident_api/src/config/host/storage/storage_graph/validation_tests.rs Updates storage graph validation tests to the renamed ESP constant.
crates/trident_api/src/config/host/storage/mod.rs Updates host storage tests to the renamed ESP constant.
crates/trident_api/src/config/host/storage/filesystem.rs Updates default ESP mount detection/serde tests to the renamed constant.
crates/trident/src/subsystems/storage/osimage.rs Updates ESP mount points in osimage tests to the renamed constant.
crates/trident/src/subsystems/storage/fstab.rs Updates fstab tests to the renamed ESP constant.
crates/trident/src/subsystems/esp.rs Switches ESP-relative path building to ctx.esp_mount_path and threads it through helpers.
crates/trident/src/init/offline/mod.rs Discovers ESP mount path from Host Status rather than assuming default path.
crates/trident/src/engine/storage/encryption.rs Updates encryption tests/functional tests to the renamed ESP constant.
crates/trident/src/engine/newroot.rs Updates functional tests to use DEFAULT_ESP_RELATIVE_MOUNT_POINT_PATH.
crates/trident/src/engine/manual_rollback/mod.rs Uses engine_context.esp_mount_path in rollback path construction.
crates/trident/src/engine/install_index.rs Updates install index tests to the renamed ESP constant.
crates/trident/src/engine/context/mod.rs Updates EngineContext::default() test/ft default ESP mount path.
crates/trident/src/engine/bootentries.rs Updates bootentries tests/functional tests to the renamed ESP constant.
crates/trident/src/engine/boot/uki.rs Removes dependency on the old constant and threads ESP mount path into UKI helpers.
crates/trident/src/engine/boot/grub.rs Updates functional test to the renamed ESP constant.
crates/osutils/src/tabfile.rs Updates osutils tabfile tests to the renamed ESP constant.
crates/docbuilder/src/main.rs Updates docbuilder constant map to the renamed ESP constant.

Comment thread crates/docbuilder/src/main.rs Outdated
Comment thread crates/trident_api/src/constants.rs
Comment thread crates/trident/src/init/offline/mod.rs
Comment thread crates/trident/src/engine/boot/uki.rs Outdated
@frhuelsz
Copy link
Copy Markdown
Contributor Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@frhuelsz frhuelsz merged commit 0f078e3 into main Apr 10, 2026
96 checks passed
frhuelsz added a commit that referenced this pull request Apr 13, 2026
…596)

# 🔍 Description
 
- Assert that the HC and COSI file agree on the ESP mount point.
- Also add a doc on ESP mount overriding.
- Use constants in docbuilder instead of hard-coded values.

Depends on:
- #595
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