Arch-Linux-Installer/encrypt.sh

18 lines
403 B
Bash
Raw Normal View History

2022-02-12 17:05:23 +01:00
#!/bin/bash
# Get variable from filesystem.
disk=$(</tmp/disk)2
# Encrypting partition.
echo "Encrypting system partition."
echo -e
cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/$disk &&
echo "Partition successfully encrypted."
# Opening encrypted partition and mounting at /dev/mapper/lvm.
echo "Opening and mounting encrypted partition."
echo -e
cryptsetup luksOpen /dev/$disk lvm &&
echo