From d1b977d7ab100eceecd9d3a505d5e10b5fa6bc21 Mon Sep 17 00:00:00 2001 From: Matt C Date: Fri, 14 May 2021 16:32:58 -0400 Subject: [PATCH] Swap janky fdisk for parted --- citrine.internal.sh | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/citrine.internal.sh b/citrine.internal.sh index 36557b4..b521d9e 100755 --- a/citrine.internal.sh +++ b/citrine.internal.sh @@ -66,6 +66,7 @@ if [[ $DISK == *"nvme"* ]]; then else NVME="no" fi +echo "NVME=$NVME" if ls /sys/firmware/efi/efivars > /dev/null; then inf "Seems like this machine was booted with EFI. Noting" @@ -73,6 +74,7 @@ if ls /sys/firmware/efi/efivars > /dev/null; then else EFI="no" fi +echo "EFI=$EFI" inf "Setting system clock via network" timedatectl set-ntp true @@ -80,30 +82,13 @@ timedatectl set-ntp true if [[ "$MANUAL" == "no" ]]; then echo "Partitioning disk" if [[ "$EFI" == "yes" ]]; then - ( - echo "g" - echo "n" - echo - echo - echo "+200M" - echo "t" - echo "1" - echo "n" - echo - echo - echo - echo "w" - ) | fdisk $DISK + parted ${DISK} mklabel gpt --script + parted ${DISK} mkpart fat32 0 300 --script + parted ${DISK} mkpart ext4 300 100% --script inf "Partitioned ${DISK} as an EFI volume" else - ( - echo "o" - echo "n" - echo - echo - echo - echo "w" - ) | fdisk $DISK + parted ${DISK} mklabel msdos --script + parted ${DISK} mkpart primary ext4 0% 100% --script inf "Partitioned ${DISK} as an MBR volume" fi