2 tool
=$
(readlink
-e "${0%/*}/..")
5 if ! mount |
grep -q "^$vm_dev_disk_root "
7 sudo cryptsetup luksFormat
--hash=sha512
--key-size=512 \
8 --cipher=aes-xts-essiv
:sha256
--align-payload=8 $vm_dev_disk_root
9 sudo cryptsetup luksOpen
$vm_dev_disk_root ${vm_lvm_lv}_root_deciphered
10 sudo mke2fs
-t ext4
-c -c -m 5 -T ext4
-b $vm_e2fs_block_size \
11 -E resize
=30G
${vm_e2fs_extended_options} \
12 -L ${vm_lvm_lv}_root \
13 /dev
/mapper
/${vm_lvm_lv}_root_deciphered
14 ! mountpoint
-q /mnt
/$vm_fqdn
15 sudo mount
-v /dev
/mapper
/${vm_lvm_lv}_root_deciphered
/mnt
/$vm_fqdn
16 sudo
install -d -m 770 -o root
-g root \
22 /mnt
/$vm_fqdn/root
/src \
23 /mnt
/$vm_fqdn/root
/src
/$vm \
26 sudo umount
-v /mnt
/$vm_fqdn
27 sudo cryptsetup luksClose
${vm_lvm_lv}_root_deciphered