aboutsummaryrefslogtreecommitdiff
path: root/cryptinstall
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2022-09-08 20:28:25 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2022-09-08 20:28:25 +0200
commit80e5266a07752cb92f2e162cbc622ff7c8a13fdd (patch)
treefab6329d78bc10509de39aaa1dc7e259b5f850ca /cryptinstall
parent37aff087854b9e256b1e17e4eddfbf98c1f6bade (diff)
Make GRUB target customisable
Diffstat (limited to 'cryptinstall')
-rwxr-xr-xcryptinstall15
1 files changed, 14 insertions, 1 deletions
diff --git a/cryptinstall b/cryptinstall
index b443abe..cac3acc 100755
--- a/cryptinstall
+++ b/cryptinstall
@@ -15,6 +15,7 @@ pacman -S --needed --noconfirm parted fzf
#
DRIVE=$1
+TARGET=$2
if [ -z "${DRIVE}" ]; then
DRIVE="/dev/$(lsblk | grep disk | fzf --disabled | awk '{print $1}')"
@@ -26,6 +27,18 @@ else
PART_PREFIX="${DRIVE}"
fi
+if [ -z "${TARGET}" ]; then
+ echo -en "\e[1m\e[1;33mEnter GRUB target (commonly i386-pc): "
+ read TARGET
+
+ echo -e "\e[0m"
+fi
+
+if [ -z "${TARGET}" ]; then
+ echo -en "\e[1m\e[1;31mGRUB target must not be empty.\e[0m"
+ exit 1
+fi
+
#
# Full Disk Encryption
#
@@ -61,7 +74,7 @@ rc-service ntpd start
basestrap /mnt base base-devel openrc elogind-openrc vim man ntp ntp-openrc git
basestrap /mnt linux linux-firmware
-artix-chroot /mnt bash -c "curl -fsSL https://raw.githubusercontent.com/HimbeerserverDE/artixinstall/main/mkcryptartix | sh -s -- ${DRIVE} ${PART_PREFIX}"
+artix-chroot /mnt bash -c "curl -fsSL https://raw.githubusercontent.com/HimbeerserverDE/artixinstall/main/mkcryptartix | sh -s -- ${DRIVE} ${PART_PREFIX} ${TARGET}"
fstabgen -U /mnt >> /mnt/etc/fstab