Had to add logic to re-format disk string in case it is an nvme drive. Also removed BIOS header creation (as it's not needed since the first it's created automatically with the first MBR partition
This commit is contained in:
parent
60ab5840ba
commit
620666220f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user