-
Notifications
You must be signed in to change notification settings - Fork 2.2k
exploring systemd hooks to enable pam_luks keyring integration #3014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
d-cas
wants to merge
3
commits into
basecamp:dev
Choose a base branch
from
d-cas:fix/modernize-initramfs-hooks
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| echo "Modernize initramfs hooks to systemd-based for UKI compatibility" | ||
|
|
||
| HOOKS_CONF="/etc/mkinitcpio.conf.d/omarchy_hooks.conf" | ||
|
|
||
| # Only apply migration if the hooks config exists and contains old-style hooks | ||
| if [[ -f "$HOOKS_CONF" ]]; then | ||
| if grep -q "base udev.*keymap consolefont.*encrypt" "$HOOKS_CONF"; then | ||
| echo "Updating initramfs hooks from legacy udev-based to systemd-based..." | ||
|
|
||
| # Replace legacy hooks with systemd equivalents: | ||
| # - udev → systemd (systemd-based initramfs) | ||
| # - keymap consolefont → sd-vconsole (systemd console with Plymouth integration) | ||
| # - encrypt → sd-encrypt (systemd LUKS unlock with better FIDO2 support) | ||
| sudo sed -i 's/base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt/base systemd plymouth keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt/' "$HOOKS_CONF" | ||
|
|
||
| echo "Regenerating initramfs with new hooks..." | ||
| sudo mkinitcpio -P | ||
|
|
||
| echo "Initramfs hooks updated successfully." | ||
| echo "Benefits: Better UKI integration, improved Plymouth support, enhanced FIDO2 compatibility" | ||
| else | ||
| echo "Hooks already modernized or config format unexpected. Skipping migration." | ||
| fi | ||
| else | ||
| echo "Omarchy hooks config not found. Skipping migration." | ||
| fi |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, from limine-snapper-sync docs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on the btrfs-overlayfs hook! Will update to use
sd-btrfs-overlayfsfor systemd compatibility.