Add support for NVMe naming scheme.

This commit is contained in:
dataprolet 2024-05-02 22:16:36 +00:00
parent 614c9d0661
commit 2f9c68216c
1 changed files with 14 additions and 2 deletions

View File

@ -164,7 +164,12 @@ lsblk | grep "$dev"
echo echo
# Get new variable. # Get new variable.
main=${dev}2 if [ $dev = "nvme0n1" ];
then
main=${dev}p2
else
main=${dev}2
fi
# Encrypting partition. # Encrypting partition.
echo "Encrypting system partition. This might take a while." echo "Encrypting system partition. This might take a while."
@ -184,7 +189,14 @@ lsblk | grep "$dev"
echo echo
echo "Creating the filesystem." echo "Creating the filesystem."
boot=${dev}1
if [ $dev = "nvme0n1" ];
then
boot=${dev}p2
else
boot=${dev}1
fi
mkfs.fat -F 32 -n UEFI /dev/$boot && mkfs.fat -F 32 -n UEFI /dev/$boot &&
echo "Filesystem for boot successfully created." echo "Filesystem for boot successfully created."
echo echo