Update install.sh

This commit is contained in:
Aaron Honeycutt 2023-04-17 19:21:56 +00:00
parent 0622599486
commit 66e9be884a

View file

@ -35,44 +35,25 @@ echo 19 # Change last partition to Swap.
echo w # write changes. echo w # write changes.
) | sudo fdisk $driveName -w always -W always ) | sudo fdisk $driveName -w always -W always
if [ $driveName = /dev/nvme* ]; then
# Set variables
efiName=${driveName}p1
rootName=${driveName}p2
swapName=${driveName}p3
# Check if the device is a SATA drive
elif [ $driveName = /dev/sd* ]; then
# Set variables
efiName=${driveName}1
rootName=${driveName}2
swapName=${driveName}3
# Check if the device is a Virtual drive
elif [ $driveName = /dev/vd* ]; then
# Set variables
efiName="{$driveName}1"
rootName="{$driveName}2"
swapName="{$driveName}3"
# Check if the device is an eMMC drive
elif [ $driveName = /dev/mmcblk* ]; then
# Set variables
efiName=${driveName}1
rootName=${driveName}2
swapName=${driveName}3
fi
# List the new partitions. # List the new partitions.
lsblk -f lsblk -f
echo "----------"
echo ""
echo "Which is the EFI partition?"
read efiName
echo ""
echo "Which is the root partition?"
read rootName
echo ""
echo "Which is the swap partition?"
read swapName
# Create EFI partition # Create EFI partition
sudo mkfs.fat -F32 -n EFI $efiName sudo mkfs.fat -F32 -n EFI $efiName
echo $efiName
sleep 120
# Encrypt the root partition # Encrypt the root partition
sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName