Skip to content

Commit

Permalink
Merge pull request #43 from uraza/main
Browse files Browse the repository at this point in the history
Partition names should be prefixed by "p" for NVMe
  • Loading branch information
suikan4github authored Apr 14, 2023
2 parents 809dafa + b5adafa commit 851bfe6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions script/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,20 @@ else
export ISEFI=0 # No, BIOS
fi # is EFI firmaare?

# Detect drive type.
# For NVME drives, partition names should be prefixed by p.
if [[ ${DEV} == *"nvme"* ]] ; then
export PARTPREFIX="p" # Yes, NVME
else
export PARTPREFIX="" # No, regular
fi

# Set partition number based on the firmware type
if [ ${ISEFI} -ne 0 ] ; then
# EFI firmware
export EFIPARTITION=1
export CRYPTPARTITION=2
export EFIPARTITION=${PARTPREFIX}1
export CRYPTPARTITION=${PARTPREFIX}2
else
# BIOS firmware
export CRYPTPARTITION=1
export CRYPTPARTITION=${PARTPREFIX}1
fi # EFI firmware

0 comments on commit 851bfe6

Please sign in to comment.