From 0c9661f2d98f9464cc5d19eb5fac5cdc9fdc226b Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 22 Dec 2019 11:45:58 +0100 Subject: format_crypto_partition.sh working. --- stages/first_stage.sh | 7 +++++-- util/format_crypto_partition.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 util/format_crypto_partition.sh diff --git a/stages/first_stage.sh b/stages/first_stage.sh index cb1503a..ba0590a 100644 --- a/stages/first_stage.sh +++ b/stages/first_stage.sh @@ -33,7 +33,8 @@ python $REPOSITORY_PATH/util/write_config.py $CONFIG_FILE_PATH export disk=$(python $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "disk") export disk_path=/dev/$disk export efi_partition_path="${disk_path}1" -export main_partition_path="${disk_path}2" +export boot_partition_path="${disk_path}2" +export main_partition_path="${disk_path}3" export hostname=$(python $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "hostname") export desktop=$(python $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "desktop") export admin_username=$(python $REPOSITORY_PATH/util/read_config_string.py $CONFIG_FILE_PATH "admin_username") @@ -48,7 +49,9 @@ bash partition_disk.sh $disk_path if [ $system_encryption == "yes" ];then - bash create_crypto_partition.sh $main_partition_path + bash format_crypto_partition.sh $main_partition_path $DEFAULT_PASSWORD + + bash open_crypto_partition.sh bash create_logical_volumes.sh diff --git a/util/format_crypto_partition.sh b/util/format_crypto_partition.sh new file mode 100644 index 0000000..bde9a1e --- /dev/null +++ b/util/format_crypto_partition.sh @@ -0,0 +1,29 @@ +#!/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 + + +cryptsetup luksFormat $main_partition_path << EOF +YES +$DEFAULT_PASSWORD +$DEFAULT_PASSWORD +EOF -- cgit v1.2.3-70-g09d2