Update encrypt.sh
This commit is contained in:
parent
bad93a49f0
commit
e96494d411
|
@ -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
|
Loading…
Reference in New Issue