From 4b2749b2a5fed50d6db0d68800061f4c955c04e5 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sun, 5 Apr 2026 21:43:23 +0200 Subject: [PATCH] install stage 1: make device mapper name match with the one after boot --- install-stage1.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install-stage1.sh b/install-stage1.sh index 53afad4..8bdace7 100644 --- a/install-stage1.sh +++ b/install-stage1.sh @@ -189,7 +189,8 @@ if yesno; then mkfs.f2fs -f -l "container" "$TARGET_PART_BOOT" >> $LOGFILE 2>&1 echo "Setting up encryption. You will be asked for the same password twice." cryptsetup luksFormat --batch-mode --type luks2 --force-password "$TARGET_PART_BIG" - cryptsetup luksOpen --batch-mode --type luks2 "$TARGET_PART_BIG" voidusb-container + DEV_MAPPER_NAME="luks-$(blkid --output value --match-tag UUID "$TARGET_PART_BIG")" + cryptsetup luksOpen --batch-mode --type luks2 "$TARGET_PART_BIG" "$DEV_MAPPER_NAME" if [ "$?" -gt 0 ]; then echo "Failed to open encrypted container. The entered passwords probably didn't match." exit 1 @@ -214,7 +215,7 @@ if yesno; then # actual storage mkdir -p /mnt/target/run/void-usb/container >> $LOGFILE 2>&1 - mount /dev/mapper/voidusb-container /mnt/target/run/void-usb/container >> $LOGFILE 2>&1 + mount /dev/mapper/"$DEV_MAPPER_NAME" /mnt/target/run/void-usb/container >> $LOGFILE 2>&1 mkdir /mnt/target/boot >> $LOGFILE 2>&1 mount "$TARGET_PART_BOOT" /mnt/target/boot mkdir /mnt/target/boot/efi >> $LOGFILE 2>&1