diff --git a/installer.sh b/installer.sh index da5b915..876a878 100755 --- a/installer.sh +++ b/installer.sh @@ -68,37 +68,37 @@ if [[ $? = 0 ]]; then filesystem=$(dialog --menu "Select a filesystem:" 0 0 0 "ext4" "Fast basic filesystem (recommended)" "btrfs" "Great for data recovery and servers" 2>&1 >/dev/tty) if [[ $uefi = true ]]; then if [[ "$filesystem" = "ext4" ]]; then - mkfs.ext4 /dev/${choice}2 | dialog --title "Creating file system..." --programbox 24 80 + mkfs.ext4 /dev/${choice}${part2} | dialog --title "Creating file system..." --programbox 24 80 else - mkfs.btrfs -f /dev/${choice}2 | dialog --title "Creating file system..." --programbox 24 80 + mkfs.btrfs -f /dev/${choice}${part2} | dialog --title "Creating file system..." --programbox 24 80 fi if [[ $? = 1 ]]; then dialog --msgbox "Formatting failed!" 0 0 failinstall fi - mkfs.fat -v -F 32 /dev/${choice}1 | dialog --title "Creating boot partition..." --programbox 24 80 + mkfs.fat -v -F 32 /dev/${choice}${part1} | dialog --title "Creating boot partition..." --programbox 24 80 if [[ $? = 1 ]]; then dialog --msgbox "Formatting failed!" 0 0 failinstall fi - mount /dev/${choice}2 /mnt + mount /dev/${choice}${part2} /mnt if [[ $? = 1 ]]; then dialog --msgbox "Mounting failed!" 0 0 failinstall fi mkdir -p /mnt/boot/efi - sh -c "mount /dev/${choice}1 /mnt/boot/efi" + sh -c "mount /dev/${choice}${part1} /mnt/boot/efi" if [[ $? = 1 ]]; then dialog --msgbox "Mounting ESP failed!" 0 0 failinstall fi else - mkfs.$filesystem /dev/${choice}1 | dialog --title "Creating file system..." --programbox 24 80 + mkfs.$filesystem /dev/${choice}${part1} | dialog --title "Creating file system..." --programbox 24 80 if [[ $? = 1 ]]; then dialog --msgbox "Formatting failed!" 0 0 failinstall fi - mount /dev/${choice}1 /mnt + mount /dev/${choice}${part1} /mnt if [[ $? = 1 ]]; then dialog --msgbox "Mounting failed!" 0 0 failinstall