fix partitioning for mmcblk and nvme devices #1

Merged
arzumify merged 2 commits from :main into main 2024-04-03 10:32:07 +01:00
1 changed files with 7 additions and 7 deletions
Showing only changes of commit 3d98bf272c - Show all commits

View File

@ -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