fix some bugs in installer
This commit is contained in:
parent
a839d0d13f
commit
36eeb1c80d
1 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,6 @@ trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
|
||||||
REPO_URL="https:mkessler-arch.maximilian-kessler.de"
|
REPO_URL="https:mkessler-arch.maximilian-kessler.de"
|
||||||
MIRRORLIST_URL="https://archlinux.org/mirrorlist/?country=DE&protocol=https&use_mirror_status=on"
|
MIRRORLIST_URL="https://archlinux.org/mirrorlist/?country=DE&protocol=https&use_mirror_status=on"
|
||||||
|
|
||||||
pacman -Sy --noconfirm pacman-contrib dialog
|
|
||||||
|
|
||||||
echo "Updating mirror list"
|
echo "Updating mirror list"
|
||||||
curl -s "$MIRRORLIST_URL" | \
|
curl -s "$MIRRORLIST_URL" | \
|
||||||
sed -e 's/^#Server/Server/' -e '/^#/d' | \
|
sed -e 's/^#Server/Server/' -e '/^#/d' | \
|
||||||
|
@ -58,7 +56,9 @@ exec 2> >(tee "stderr.log")
|
||||||
timedatectl set-ntp true
|
timedatectl set-ntp true
|
||||||
|
|
||||||
### Setup the disk and partitions ###
|
### Setup the disk and partitions ###
|
||||||
swap_size=$(free --mebi | awk '/Mem:/ {print $2}')
|
ram_size=$(free --mebi | awk '/Mem:/ {print $2}')
|
||||||
|
swap_size=$((ram_size + 1024))M # 1 Gigabyte more swap space than available ram
|
||||||
|
root_size=60G
|
||||||
|
|
||||||
# creates two partitions: one boot partition and another partition, filling the rest of space
|
# creates two partitions: one boot partition and another partition, filling the rest of space
|
||||||
echo "Creating partitions on ${device}..."
|
echo "Creating partitions on ${device}..."
|
||||||
|
@ -83,7 +83,7 @@ wipefs "${part_luks}"
|
||||||
|
|
||||||
echo "Setting up luks on ${part_luks}"
|
echo "Setting up luks on ${part_luks}"
|
||||||
echo "${password}" | cryptsetup luksFormat -q "${part_luks}"
|
echo "${password}" | cryptsetup luksFormat -q "${part_luks}"
|
||||||
echo "${password}" | cryptsetup open "${part_luks}"
|
echo "${password}" | cryptsetup open "${part_luks}" "${cryptlvm}"
|
||||||
|
|
||||||
pvcreate "${mapped_device}"
|
pvcreate "${mapped_device}"
|
||||||
vgcreate "${vlgrp}" "${mapped_device}"
|
vgcreate "${vlgrp}" "${mapped_device}"
|
||||||
|
|
Loading…
Reference in a new issue