File sdbootutil.patch of Package sdbootutil

Index: sdbootutil-1+git20260115.cd41d07/sdbootutil
===================================================================
--- sdbootutil-1+git20260115.cd41d07.orig/sdbootutil
+++ sdbootutil-1+git20260115.cd41d07/sdbootutil
@@ -482,6 +482,7 @@ sedrootflags()
 	# "empty" t jumps are used to reset the condition after very
 	# s///.
 	local root_param="UUID=$root_uuid"
+	[ -n "$root_uuid" ] || root_param="$root_device"
 	[ -z "$root_device_is_crypt" ] || root_param="$root_device"
 	local sed_arguments=("-e s/[ \t]\+/ /g"
 		"-e s/^.*\(initrd=[^ ]*\|BOOT_IMAGE=[^ ]*\)\s*/\1 /"
@@ -3920,9 +3921,9 @@ fi
 [ -n "$arg_esp_path" ] && export SYSTEMD_ESP_PATH="$arg_esp_path"
 
 eval_bootctl
-read -r root_uuid root_device < <(findmnt / -v -r -n -o UUID,SOURCE)
+read -r root_device root_uuid < <(findmnt / -v -r -n -o SOURCE,UUID)
 root_device_is_crypt=
-[ "$(lsblk --noheadings -o TYPE "$root_device")" = "crypt" ] && root_device_is_crypt=1
+[ "$(lsblk --noheadings -o TYPE "$root_device" 2>/dev/null)" = "crypt" ] && root_device_is_crypt=1
 root_subvol=""
 subvol_prefix=""
 if [ "$(stat -f -c %T /)" = "btrfs" ] && [ -d /.snapshots ]; then
@@ -3947,7 +3948,6 @@ fi
 [ -n "$arg_arch" ] && firmware_arch="$arg_arch"
 
 [ -n "$boot_root" ] || err "No ESP detected. Legacy system?"
-[ -n "$root_uuid" ] || err "Can't determine root UUID"
 [ -n "$root_subvol" ] || [ -z "$have_snapshots" ] || err "Can't determine root subvolume"
 [ -n "$root_device" ] || err "Can't determine root device"
 [ -n "$firmware_arch" ] || err "Can't determine firmware arch"
openSUSE Build Service is sponsored by