From b26983b4e967957f5ecc32d75663a723f97c2588 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 22 Dec 2019 15:20:25 +0100 Subject: Reimplemented some modules for luks encryption. --- util/create_filesystems.sh | 9 ++++++--- util/install_bootloader.sh | 6 +++--- util/mount_filesystems.sh | 5 ++++- util/unmount_filesystems.sh | 7 +++++-- 4 files changed, 18 insertions(+), 9 deletions(-) (limited to 'util') 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 . -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 . -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 . -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" -- cgit v1.2.3-70-g09d2