From 7305ac32320c8c668426337bbd56d343398858a3 Mon Sep 17 00:00:00 2001 From: calvinreu <52322921+calvinreu@users.noreply.github.com> Date: Tue, 19 Jul 2022 11:58:57 +0200 Subject: [PATCH] autodetect partions (#13) --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f12ccd9..df7e329 100755 --- a/install.sh +++ b/install.sh @@ -68,8 +68,9 @@ parted -s "$DISK" \ set 1 esp on \ mkpart cryptroot 101MiB 100% \ -ESP="/dev/disk/by-partlabel/ESP" -cryptroot="/dev/disk/by-partlabel/cryptroot" +sleep 0.1 +ESP="/dev/$(lsblk $DISK -o NAME,PARTLABEL | grep ESP| cut -d " " -f1 | cut -c7-)" +cryptroot="/dev/$(lsblk $DISK -o NAME,PARTLABEL | grep cryptroot | cut -d " " -f1 | cut -c7-)" # Informing the Kernel of the changes. echo "Informing the Kernel about the disk changes."