fix partitioning for mmcblk and nvme devices #1
14
installer.sh
14
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)
|
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 [[ $uefi = true ]]; then
|
||||||
if [[ "$filesystem" = "ext4" ]]; 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
|
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
|
fi
|
||||||
if [[ $? = 1 ]]; then
|
if [[ $? = 1 ]]; then
|
||||||
dialog --msgbox "Formatting failed!" 0 0
|
dialog --msgbox "Formatting failed!" 0 0
|
||||||
failinstall
|
failinstall
|
||||||
fi
|
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
|
if [[ $? = 1 ]]; then
|
||||||
dialog --msgbox "Formatting failed!" 0 0
|
dialog --msgbox "Formatting failed!" 0 0
|
||||||
failinstall
|
failinstall
|
||||||
fi
|
fi
|
||||||
mount /dev/${choice}2 /mnt
|
mount /dev/${choice}${part2} /mnt
|
||||||
if [[ $? = 1 ]]; then
|
if [[ $? = 1 ]]; then
|
||||||
dialog --msgbox "Mounting failed!" 0 0
|
dialog --msgbox "Mounting failed!" 0 0
|
||||||
failinstall
|
failinstall
|
||||||
fi
|
fi
|
||||||
mkdir -p /mnt/boot/efi
|
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
|
if [[ $? = 1 ]]; then
|
||||||
dialog --msgbox "Mounting ESP failed!" 0 0
|
dialog --msgbox "Mounting ESP failed!" 0 0
|
||||||
failinstall
|
failinstall
|
||||||
fi
|
fi
|
||||||
else
|
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
|
if [[ $? = 1 ]]; then
|
||||||
dialog --msgbox "Formatting failed!" 0 0
|
dialog --msgbox "Formatting failed!" 0 0
|
||||||
failinstall
|
failinstall
|
||||||
fi
|
fi
|
||||||
mount /dev/${choice}1 /mnt
|
mount /dev/${choice}${part1} /mnt
|
||||||
if [[ $? = 1 ]]; then
|
if [[ $? = 1 ]]; then
|
||||||
dialog --msgbox "Mounting failed!" 0 0
|
dialog --msgbox "Mounting failed!" 0 0
|
||||||
failinstall
|
failinstall
|
||||||
|
|
Reference in New Issue