summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2019-12-22 15:20:25 +0100
committerxengineering <mail2xengineering@protonmail.com>2019-12-22 15:20:25 +0100
commitb26983b4e967957f5ecc32d75663a723f97c2588 (patch)
tree2d22243e42ccd8c13696a9aae50d62a5911d90e2
parent36bb8d372ab57d68dae365619bf20cf89a612021 (diff)
downloadarchinstall-b26983b4e967957f5ecc32d75663a723f97c2588.tar
archinstall-b26983b4e967957f5ecc32d75663a723f97c2588.tar.zst
archinstall-b26983b4e967957f5ecc32d75663a723f97c2588.zip
Reimplemented some modules for luks encryption.
-rw-r--r--stages/first_stage.sh12
-rw-r--r--util/create_filesystems.sh9
-rw-r--r--util/install_bootloader.sh6
-rw-r--r--util/mount_filesystems.sh5
-rw-r--r--util/unmount_filesystems.sh7
5 files changed, 26 insertions, 13 deletions
diff --git a/stages/first_stage.sh b/stages/first_stage.sh
index b268353..9520894 100644
--- a/stages/first_stage.sh
+++ b/stages/first_stage.sh
@@ -55,13 +55,17 @@ if [ $system_encryption == "yes" ];then
bash setup_lvm.sh
- export main_partition_path="/dev/SystemVolumeGroup/root"
+ export root_partition_path="/dev/SystemVolumeGroup/root"
+
+else
+
+ export root_partition_path=$main_partition_path
fi
-bash create_filesystems.sh $efi_partition_path $main_partition_path
+bash create_filesystems.sh $efi_partition_path $boot_partition_path $root_partition_path
-bash mount_filesystems.sh $main_partition_path
+bash mount_filesystems.sh $boot_partition_path $root_partition_path
bash install_packages.sh $desktop
@@ -73,6 +77,6 @@ echo "bash second_stage.sh" | arch-chroot /mnt
bash copy_archinstall_log.sh $LOG_FILE_PATH
-bash unmount_filesystems.sh $main_partition_path
+bash unmount_filesystems.sh $boot_partition_path $root_partition_path
bash print_final_message.sh $DEFAULT_PASSWORD
diff --git a/util/create_filesystems.sh b/util/create_filesystems.sh
index 58d67bb..41ed84a 100644
--- a/util/create_filesystems.sh
+++ b/util/create_filesystems.sh
@@ -19,12 +19,15 @@
efi_partition_path=$1 # e.g. /dev/sda1
-main_partition_path=$2 # e.g. /dev/sda2
+boot_partition_path=$2 # e.g. /dev/sda2
+root_partition_path=$3 # e.g. /dev/sda3 or /dev/SystemVolumeGroup/root
mkfs.fat -F32 $efi_partition_path
fatlabel $efi_partition_path "EFI"
-mkfs.ext4 $main_partition_path
-e2label $main_partition_path "MAIN"
+mkfs.ext4 $boot_partition_path
+e2label $boot_partition_path "BOOT"
+mkfs.ext4 $root_partition_path
+e2label $root_partition_path "MAIN"
echo "Created filesystems - OK"
diff --git a/util/install_bootloader.sh b/util/install_bootloader.sh
index 29e211f..cf6c374 100644
--- a/util/install_bootloader.sh
+++ b/util/install_bootloader.sh
@@ -18,13 +18,13 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-boot_partition_path=$1
+efi_partition_path=$1
-mount $boot_partition_path /mnt
+mount $efi_partition_path /mnt
grub-install --target=x86_64-efi --efi-directory=/mnt --bootloader-id=GRUB \
--removable
grub-mkconfig -o /boot/grub/grub.cfg
-umount $boot_partition_path
+umount $efi_partition_path
echo "Installed bootloader - OK"
diff --git a/util/mount_filesystems.sh b/util/mount_filesystems.sh
index 4bb66e4..f24421b 100644
--- a/util/mount_filesystems.sh
+++ b/util/mount_filesystems.sh
@@ -18,9 +18,12 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-root_partition_path=$1 # e.g. /dev/sda2
+boot_partition_path=$1
+root_partition_path=$2
mount $root_partition_path /mnt
+mkdir /mnt/boot
+mount $boot_partition_path /mnt/boot
echo "Mounted filesystems - OK"
diff --git a/util/unmount_filesystems.sh b/util/unmount_filesystems.sh
index 770a5e7..6ccce3b 100644
--- a/util/unmount_filesystems.sh
+++ b/util/unmount_filesystems.sh
@@ -18,9 +18,12 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-root_partition_path=$1 # e.g. /dev/sda2
+boot_partition_path=$1
+root_partition_path=$2
-cd /root && umount $root_partition_path
+cd /root
+umount $boot_partition_path
+umount $root_partition_path
echo "Unmounted filesystems - OK"