Update encrypt.sh

This commit is contained in:
proledatarian 2022-02-12 16:05:23 +00:00
parent bad93a49f0
commit e96494d411
1 changed files with 17 additions and 0 deletions

17
encrypt.sh Normal file
View File

@ -0,0 +1,17 @@
#!/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