You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 14fa71c
Browse filesBrowse the repository at this point in the historyBrowse files
add support for detached LUKS header and UUID fallbacks (#378)
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:
* grub-probe --target=fs_uuid aborted on detached headers.
* grep-based extraction of UUID from GRUB_CMDLINE_LINUX_DEFAULT failed
when cryptdevice= did not contain “UUID=…”.
This patch:
1. Wraps grub-probe in a try/blkid/lsblk cascade that always returns the
filesystem UUID or prints a clear error.
2. 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 <uuid>’ when possible,
• falls back to ‘cryptomount -a’ only if no UUID can be extracted.
3. 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.
root_uuid=$(${grub_probe} --device ${root_device} --target="fs_uuid"2>/dev/null)# UUID of the root device
115
-
root_uuid_subvolume=$(btrfs subvolume show / 2>/dev/null)|| print_error "UUID of the root subvolume is not available";# If UUID of root subvolume is not available, then exit
116
-
root_uuid_subvolume=$(awk -F":"'match($1, /(^[ \t]+UUID)/) {sub(/^[ \t]+/, "", $2); print $2}'<<<"$root_uuid_subvolume")# UUID of the root subvolume '
boot_uuid=$(${grub_probe} --device ${boot_device} --target="fs_uuid"2>/dev/null)# UUID of the boot device
120
-
boot_uuid_subvolume=$(btrfs subvolume show "$boot_directory"2>/dev/null)|| boot_uuid_subvolume=" UUID: $root_uuid_subvolume";# If boot folder isn't a subvolume, then UUID=root_uuid_subvolume
121
-
boot_uuid_subvolume=$(awk -F":"'match($1, /(^[ \t]+UUID)/) {sub(/^[ \t]+/, "", $2); print $2}'<<<"$boot_uuid_subvolume")# UUID of the boot subvolume '
0 commit comments