install: Retry on passphrase mismatch

This commit is contained in:
2024-05-11 13:36:06 +02:00
parent d117edc6d1
commit d84b67360b
2 changed files with 8 additions and 4 deletions

View File

@@ -32,8 +32,10 @@ EOF
# might take a bit for the new partion table to be updated in-kernel
sleep 1
while : ; do
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3
cryptsetup --batch-mode open ${DEVICE}3 cryptpart
cryptsetup --batch-mode open --tries 1 ${DEVICE}3 cryptpart && break
done
pvcreate /dev/mapper/cryptpart
vgcreate vgbase /dev/mapper/cryptpart

View File

@@ -32,8 +32,10 @@ EOF
# might take a bit for the new partion table to be updated in-kernel
sleep 1
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}p3
cryptsetup --batch-mode open ${DEVICE}p3 cryptpart
while : ; do
cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3
cryptsetup --batch-mode open --tries 1 ${DEVICE}3 cryptpart && break
done
pvcreate /dev/mapper/cryptpart
vgcreate vgbase /dev/mapper/cryptpart