Arch-Linux-Installer/encrypt.sh

24 lines
493 B
Bash

#!/bin/bash
# Get variable from filesystem.
part=$(</tmp/disk)2
# Encrypting partition.
echo "Encrypting system partition."
echo -e
#cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/$part &&
echo "Partition successfully encrypted."
echo -e
# Opening encrypted partition and mounting at /dev/mapper/lvm.
echo "Opening and mounting encrypted partition."
echo -e
#cryptsetup luksOpen /dev/$part lvm &&
echo "Partition opened and mounted:"
echo -e
disk="${part%?}"
lsblk | grep "$disk"