From b93becb8f270dd0568765a79aa5fc4b013594c15 Mon Sep 17 00:00:00 2001 From: fingolfin0 <66904266+fingolfin0@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:43:50 +0300 Subject: [PATCH] Respect GRUB_DISABLE_LINUX_PARTUUID setting --- 41_snapshots-btrfs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 3aac239..3af4a09 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -151,7 +151,9 @@ CLASS="--class snapshots --class gnu-linux --class gnu --class os" oldIFS=$IFS ## Detect uuid requirement (lvm,btrfs...) check_uuid_required() { -if [ "${root_uuid}" = "" ] || [ "${GRUB_DISABLE_LINUX_UUID}" = "true" ] \ +if [ "${GRUB_DISABLE_LINUX_PARTUUID}" = "false" ]; then + LINUX_ROOT_DEVICE=PARTUUID=$(${grub_probe} --device "${root_device}" --target=partuuid 2>/dev/null) +elif [ "${root_uuid}" = "" ] || [ "${GRUB_DISABLE_LINUX_UUID}" = "true" ] \ || ! test -e "/dev/disk/by-uuid/${root_uuid}" \ || ( test -e "${root_device}" && uses_abstraction "${root_device}" lvm ); then LINUX_ROOT_DEVICE=${root_device}