Update encrypt.sh
This commit is contained in:
parent
20ad1a26fe
commit
8fa8c81c9e
27
encrypt.sh
27
encrypt.sh
|
@ -21,3 +21,30 @@ echo -e
|
||||||
|
|
||||||
disk="${part%?}"
|
disk="${part%?}"
|
||||||
lsblk | grep "$disk"
|
lsblk | grep "$disk"
|
||||||
|
echo -e
|
||||||
|
|
||||||
|
# Creating physical volume.
|
||||||
|
echo "Creating physical volume."
|
||||||
|
pvcreate /dev/mapper/lvm &&
|
||||||
|
echo -e
|
||||||
|
|
||||||
|
# Creating volume group "main".
|
||||||
|
echo "Creating volume group.
|
||||||
|
vgcreate main /dev/mapper/lvm &&
|
||||||
|
echo -e
|
||||||
|
|
||||||
|
# Creating logical volumes.
|
||||||
|
echo "Creating logical volumes for root and home."
|
||||||
|
echo -e
|
||||||
|
|
||||||
|
# Lol, this part:
|
||||||
|
part=$(</tmp/disk)2 && i=( $(lsblk | grep "$part" | tail -n+1 | awk '{print $4}') ) && size="${i%?}"
|
||||||
|
|
||||||
|
echo "Your system partition has a size of $size GB."
|
||||||
|
echo "What size should your root partition have?"
|
||||||
|
#read root
|
||||||
|
echo "Creating a $root GB root volume."
|
||||||
|
echo -e
|
||||||
|
|
||||||
|
lvcreate -L "${root}G" -n root main
|
||||||
|
lvcreate -l 100%FREE -n home main
|
||||||
|
|
Loading…
Reference in New Issue