diff options
author | xengineering <mail2xengineering@protonmail.com> | 2019-12-22 11:45:58 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2019-12-22 11:45:58 +0100 |
commit | 0c9661f2d98f9464cc5d19eb5fac5cdc9fdc226b (patch) | |
tree | c1143f706078b6ddc120b67580eb141183d87223 | |
parent | 607b0d56bab9b8babdffbdca21a82c7394a2db22 (diff) | |
download | archinstall-0c9661f2d98f9464cc5d19eb5fac5cdc9fdc226b.tar archinstall-0c9661f2d98f9464cc5d19eb5fac5cdc9fdc226b.tar.zst archinstall-0c9661f2d98f9464cc5d19eb5fac5cdc9fdc226b.zip |
format_crypto_partition.sh working.
-rw-r--r-- | stages/first_stage.sh | 7 | ||||
-rw-r--r-- | util/format_crypto_partition.sh | 29 |
2 files changed, 34 insertions, 2 deletions
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 <https://www.gnu.org/licenses/>. + + +main_partition_path=$1 +DEFAULT_PASSWORD=$2 + + +cryptsetup luksFormat $main_partition_path << EOF +YES +$DEFAULT_PASSWORD +$DEFAULT_PASSWORD +EOF |