Some Small Corrections

This commit is contained in:
seiichiro 2021-08-22 16:20:02 +02:00
parent b0e767f9be
commit 01fd296523

View file

@ -95,8 +95,9 @@ fi
echo "Paritioning Disk ${device}"
if [[ "${systype}" == "x86_64-efi" ]]; then
parted -s "$device" \
mklabel gpt \
mkpart ESP fat32 1MiB 513MiB \
set esp 1 on mkpart \
set esp 1 on \
mkpart cryptroot 512MiB 100%
part_esp="/dev/disk/by-partlabel/ESP"
@ -107,15 +108,16 @@ if [[ "${systype}" == "x86_64-efi" ]]; then
mkfs.fat -F32 -n EFI "${part_esp}"
else
parted -s "$device" \
mkpart grub fat32 1MiB 2MiB \
set esp 1 on mkpart \
mklabel gpt \
mkpart grub 1MiB 2MiB \
set bios_grub 1 on \
mkpart cryptroot 2MiB 100%
part_root="/dev/disk/by-partlabel/cryptroot"
fi
echo "Creating Encrypted Root Partition"
cryptsetup luksFormat --type luks1 --cipher aes-xts-plain64 --hash sha512 --keysize 512 "${part_root}"
cryptsetup luksFormat --type luks1 --cipher aes-xts-plain64 --hash sha512 --key-size 512 "${part_root}"
cryptsetup open "${part_root}" "cryptroot"
crypt_root="/dev/mapper/cryptroot"