diff --git a/bare-arch-install.sh b/bare-arch-install.sh index 0272412..006bbbf 100755 --- a/bare-arch-install.sh +++ b/bare-arch-install.sh @@ -123,10 +123,27 @@ declare -a DISKS get_disks DISKS get_choice "Which disk are you wanting to use? : " DISK "${DISKS[@]}" -EFI_PARTITION=${DISK}1 -SWAP_PARTITION=${DISK}2 -ROOT_PARTITION=${DISK}3 +# If the disk is a nvme drive +if [[ "$DISK" =~ ^/dev/nvmen[0-9]$ ]] + DISK_BASE=${DISK}p +else + DISK_BASE="${DISK}" +fi + +case $BOOT_METHOD in + EFI) + EFI_PARTITION=${DISK_BASE}1 + SWAP_PARTITION=${DISK_BASE}2 + ROOT_PARTITION=${DISK_BASE}3 + ;; + + BIOS) + SWAP_PARTITION=${DISK_BASE}1 + ROOT_PARTITION=${DISK_BASE}2 + ;; + +esac ## New Login creds for your new user and the root user ROOT_PASSWORD="" get_answer "What do you want the root password to be? : " ROOT_PASSWORD @@ -152,17 +169,6 @@ FORMAT_DISK_COMMANDS_BIOS=" # Create MBR partition table o -# Create bios header (area where boot information is stored at the beginning of the disk) -n -# Create Primary partition (which is technically the default anyway) -p -# Press Enter to select default partition number - -# Press Enter to select default starting sector - -# Allocate 10 MB at beginning of disk for BIOS table (you will do nothing with it) -+10MiB - # Create Swap Partition n # Create Primary partition (which is technically the default anyway)