WIP
This commit is contained in:
parent
7cf9a58d18
commit
107def41ca
|
@ -184,32 +184,37 @@ echo -en "$pwcr\n$pwcr" | cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/$ma
|
|||
echo "Partition successfully encrypted."
|
||||
echo
|
||||
|
||||
# Opening encrypted partition and mounting at /dev/mapper/lvm.
|
||||
# Opening encrypted partition and mounting at /dev/mapper/main.
|
||||
echo "Decrypting.. This also might take a while."
|
||||
echo
|
||||
echo -en "$pwcr\n$pwcr" | cryptsetup luksOpen /dev/$main lvm &&
|
||||
echo -en "$pwcr\n$pwcr" | cryptsetup luksOpen /dev/$main main &&
|
||||
echo "Partition successfully opened."
|
||||
echo
|
||||
|
||||
lsblk | grep "$dev"
|
||||
echo
|
||||
|
||||
exit
|
||||
|
||||
# Creating btrfs partition.
|
||||
mkfs.btrfs /dev/mapper/main
|
||||
|
||||
# Creating physical volume.
|
||||
echo "Creating physical volume."
|
||||
pvcreate /dev/mapper/lvm &&
|
||||
echo
|
||||
#echo "Creating physical volume."
|
||||
#pvcreate /dev/mapper/lvm &&
|
||||
#echo
|
||||
|
||||
# Creating volume group "main".
|
||||
echo "Creating volume group."
|
||||
vgcreate main /dev/mapper/lvm &&
|
||||
echo
|
||||
#echo "Creating volume group."
|
||||
#vgcreate main /dev/mapper/lvm &&
|
||||
#echo
|
||||
|
||||
# Creating logical volumes.
|
||||
echo "Creating logical volumes for root and home."
|
||||
lvcreate -L ${szrt}G -n root main &&
|
||||
lvcreate -l 100%FREE -n home main &&
|
||||
echo "Logical volumes successfully created."
|
||||
echo
|
||||
#echo "Creating logical volumes for root and home."
|
||||
#lvcreate -L ${szrt}G -n root main &&
|
||||
#lvcreate -l 100%FREE -n home main &&
|
||||
#echo "Logical volumes successfully created."
|
||||
#echo
|
||||
|
||||
echo "Creating the filesystem."
|
||||
boot=${dev}1
|
||||
|
@ -217,23 +222,23 @@ mkfs.fat -F 32 -n UEFI /dev/$boot &&
|
|||
echo "Filesystem for boot successfully created."
|
||||
echo
|
||||
|
||||
mkfs.ext4 -L root /dev/mapper/main-root &&
|
||||
echo "Filesystem for root successfully created."
|
||||
echo
|
||||
#mkfs.ext4 -L root /dev/mapper/main-root &&
|
||||
#echo "Filesystem for root successfully created."
|
||||
#echo
|
||||
|
||||
mkfs.ext4 -L home /dev/mapper/main-home &&
|
||||
echo "Filesystem for home successfully created."
|
||||
echo "Done."
|
||||
echo
|
||||
#mkfs.ext4 -L home /dev/mapper/main-home &&
|
||||
#echo "Filesystem for home successfully created."
|
||||
#echo "Done."
|
||||
#echo
|
||||
|
||||
echo "Mounting.."
|
||||
mount /dev/mapper/main-root /mnt &&
|
||||
mkdir /mnt/boot &&
|
||||
mkdir /mnt/home &&
|
||||
mount /dev/$boot /mnt/boot &&
|
||||
mount /dev/mapper/main-home /mnt/home &&
|
||||
echo "Mounting complete."
|
||||
echo
|
||||
#echo "Mounting.."
|
||||
#mount /dev/mapper/main-root /mnt &&
|
||||
#mkdir /mnt/boot &&
|
||||
#mkdir /mnt/home &&
|
||||
#mount /dev/$boot /mnt/boot &&
|
||||
#mount /dev/mapper/main-home /mnt/home &&
|
||||
#echo "Mounting complete."
|
||||
#echo
|
||||
|
||||
lsblk | grep "$dev"
|
||||
echo
|
Loading…
Reference in New Issue