From b9da09402a308508d0e0574187398f928c3319ae Mon Sep 17 00:00:00 2001 From: hygienic-books <hygienic-books@tentic.net> Date: Sun, 26 Mar 2023 17:26:02 +0200 Subject: [PATCH] fix(os): Identify disk by partition UUID (#3) --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index e1e7177..53c640e 100644 --- a/setup.sh +++ b/setup.sh @@ -105,7 +105,7 @@ function we_have_exactly_one_part () { function get_drive_id () { local drive_id_list drive_id_single - drive_id_list="$(find -L /dev/disk/by-id -samefile "${1:?}" | sort)" + drive_id_list="$(find -L /dev/disk/by-partuuid -samefile "${1:?}" | sort)" drive_id_single="$(head -n1 <<<"${drive_id_list}")" if [[ "$(wc -l <<<"${drive_id_single}")" -eq '1' ]] && [[ "$(wc -c <<<"${drive_id_single}")" -gt '1' ]]; then printf -- '%s' "${drive_id_single}"