From c524c8431cc1c34b06ab54ce2de32ccd0359622e Mon Sep 17 00:00:00 2001 From: Attila Hegedus Date: Tue, 9 Sep 2025 08:54:08 +0200 Subject: [PATCH] add handling for p partitions --- raspberry/arch_deploy.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/raspberry/arch_deploy.sh b/raspberry/arch_deploy.sh index 8c73ef8..93bb136 100644 --- a/raspberry/arch_deploy.sh +++ b/raspberry/arch_deploy.sh @@ -135,15 +135,17 @@ partitioning() print_color "Create MS-DOS MBR..." "blue" sudo parted -s ${DEVICE} mklabel msdos > /dev/null 2>&1 print_color "Partitioning..." "blue" - sudo parted -s ${DEVICE} mkpart primary fat32 1MiB 513MiB > /dev/null 2>&1 + + sudo parted -s ${DEVICE} mkpart primary fat32 1MiB 513MiB > /dev/null 2>&1 sudo parted -s ${DEVICE} mkpart primary ext4 513MiB 100% > /dev/null 2>&1 } format_partitions() { + p=$(( ${#DEVICE} -gt 3 ? "p" : "" )) print_color "Formatting Partitions..." "blue" - sudo mkfs.vfat -F32 ${DEVICE}1 > /dev/null 2>&1 - sudo mkfs.ext4 -F ${DEVICE}2 > /dev/null 2>&1 + sudo mkfs.vfat -F32 ${DEVICE}${p}1 > /dev/null 2>&1 + sudo mkfs.ext4 -F ${DEVICE}${p}2 > /dev/null 2>&1 } mount_partitions() @@ -155,8 +157,9 @@ mount_partitions() sudo mkdir -p "$path" done print_color "Mounting Partitions..." "blue" - sudo mount -t vfat ${DEVICE}1 $boot - sudo mount ${DEVICE}2 $root + p=$(( ${#DEVICE} -gt 3 ? "p" : "" )) + sudo mount -t vfat ${DEVICE}${p}1 $boot + sudo mount ${DEVICE}${p}2 $root } prep_device()