Remove the encrypt initramfs hook from unencrypted installs - #143
Open
jonbng wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the installer’s Limine finalization step to ensure the encrypt mkinitcpio hook is only present when the target root filesystem is actually encrypted (LUKS), eliminating a misleading boot-time error on unencrypted systems while preserving/restoring correct behavior for encrypted installs.
Changes:
- Add
_configure_initramfs_encryption_hook()and invoke it duringfinalize_limine_boot()to removeencrypton unencrypted installs and restore it (preferably beforefilesystems) when encryption is in use. - Add unit tests covering removal, preservation, and restoration of the
encrypthook.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
configs/airootfs/usr/share/omarchy-iso/orchestrator/phases_impl.py |
Adds hook reconciliation logic and runs it before the final Limine/UKI build step. |
test/unit/test_provisioning_state.py |
Adds unit tests validating hook removal/retention/restoration behavior across encrypted vs unencrypted contexts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
omarchy-settingsincludes theencryptmkinitcpio hook for every installation.On an unencrypted system, the hook interprets the normal
root=PARTUUID=...argument as an encrypted-root device and prints:Boot continues, but the error is misleading.
Solution
Before building the final UKI:
encrypthook for unencrypted installations.filesystemswhen an encrypted installation is missing the hook.Testing
Added tests covering:
Focused unit suite passes: 26 tests.