diff --git a/usr/local/bin/install_to_disk.sh b/usr/local/bin/install_to_disk.sh index e227f8d..c992832 100755 --- a/usr/local/bin/install_to_disk.sh +++ b/usr/local/bin/install_to_disk.sh @@ -269,9 +269,10 @@ sudo sync echo "Finalizing installation..." # Mount the new root partition to make final adjustments -TARGET_ROOT_PART="${TARGET_DEVICE}1" -if [[ "$TARGET_DEVICE" =~ nvme|mmcblk ]]; then +if [[ "$TARGET_DEVICE" =~ (nvme|mmcblk) ]]; then TARGET_ROOT_PART="${TARGET_DEVICE}p1" +else + TARGET_ROOT_PART="${TARGET_DEVICE}1" fi # Find the actual root partition (might not be partition 1) @@ -345,9 +346,10 @@ if sudo mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then sudo mkdir -p "$EFI_MOUNT" # Find EFI partition (should be partition 2) - EFI_PART="${TARGET_DEVICE}2" - if [[ "$TARGET_DEVICE" =~ nvme|mmcblk ]]; then + if [[ "$TARGET_DEVICE" =~ (nvme|mmcblk) ]]; then EFI_PART="${TARGET_DEVICE}p2" + else + EFI_PART="${TARGET_DEVICE}2" fi if sudo mount "$EFI_PART" "$EFI_MOUNT" 2>/dev/null; then