add support for detached LUKS header and UUID fallbacks #378
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.
Two hard failures prevented 41-snapshots-btrfs from generating a snapshot submenu when the root LUKS header is detached and cryptdevice= uses a /dev/disk/by-id path:
This patch:
Wraps grub-probe in a try/blkid/lsblk cascade that always returns the filesystem UUID or prints a clear error.
Replaces the fixed “cryptomount -u $(grep …UUID=…)” line with logic that:
• accepts both UUID=… and /dev/disk/by-id/… syntaxes,
• resolves paths to a canonical UUID with blkid,
• emits ‘cryptomount -u ’ when possible,
• falls back to ‘cryptomount -a’ only if no UUID can be extracted.
Keeps the previous behavior unchanged for unencrypted systems or for installations that already worked.
Result: snapshot menu is produced and boots correctly on standard (setup with inline header), detached-header, and by-id configurations; no regression for existing users.
Please read Issue #377