From fc727bec9ca7c0ba1465bdd6b45ba262244191ab Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 22 Dec 2019 14:37:59 +0100 Subject: Formatting and opening luks Partition works. --- stages/first_stage.sh | 4 ++-- util/format_crypto_partition.sh | 6 +----- util/open_crypto_partition.sh | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 util/open_crypto_partition.sh diff --git a/stages/first_stage.sh b/stages/first_stage.sh index ba0590a..b2331f0 100644 --- a/stages/first_stage.sh +++ b/stages/first_stage.sh @@ -51,9 +51,9 @@ if [ $system_encryption == "yes" ];then bash format_crypto_partition.sh $main_partition_path $DEFAULT_PASSWORD - bash open_crypto_partition.sh + bash open_crypto_partition.sh $main_partition_path $DEFAULT_PASSWORD - bash create_logical_volumes.sh + bash create_logical_volumes.sh $main_partition_path fi diff --git a/util/format_crypto_partition.sh b/util/format_crypto_partition.sh index bde9a1e..97cdad4 100644 --- a/util/format_crypto_partition.sh +++ b/util/format_crypto_partition.sh @@ -22,8 +22,4 @@ main_partition_path=$1 DEFAULT_PASSWORD=$2 -cryptsetup luksFormat $main_partition_path << EOF -YES -$DEFAULT_PASSWORD -$DEFAULT_PASSWORD -EOF +echo -n "$DEFAULT_PASSWORD" | cryptsetup luksFormat $main_partition_path - diff --git a/util/open_crypto_partition.sh b/util/open_crypto_partition.sh new file mode 100644 index 0000000..2a01c55 --- /dev/null +++ b/util/open_crypto_partition.sh @@ -0,0 +1,25 @@ +#!/bin/bash + + +# archinstall - A minimal Installation Script for Arch Linux +# Copyright (C) 2019 xengineering + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +main_partition_path=$1 +DEFAULT_PASSWORD=$2 + + +echo -n "$DEFAULT_PASSWORD" | cryptsetup open $main_partition_path main - -- cgit v1.2.3-70-g09d2