From 4d5bab3576caaa4eb5dcdb7a0a0f90256f3c0623 Mon Sep 17 00:00:00 2001 From: beech Date: Thu, 19 Jun 2025 00:34:19 -0500 Subject: [PATCH] Updated install1 --- README.md | 4 ---- install1.sh | 14 +++++++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index eaa7b23..205a893 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,6 @@ Boot into your Arch ISO & run commands: curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install1.sh -o install1.sh sh install1.sh -# Installer 2 -curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install2.sh -o install2.sh -sh install2.sh - # Preparing for first boot exit umount -R /mnt diff --git a/install1.sh b/install1.sh index 2fccb5b..5ccc44f 100644 --- a/install1.sh +++ b/install1.sh @@ -10,7 +10,12 @@ echo "-------------------------------------------------" lsblk echo "Specify drive name for install (ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" -read -r -p "Enter the disk: " DISK +read -r DISK + +if [[ ! -b $DISK ]]; then + echo "Error: Disk $DISK does not exist." + exit 1 +fi echo -e "\nFormatting disk...\n$HR" @@ -19,9 +24,10 @@ sgdisk -Z $DISK # zap all on disk sgdisk -a 2048 -o $DISK # new gpt disk 2048 alignment # create partitions +read -r -p "Enter the root partition size (e.g., 35G): " ROOT_SIZE sgdisk -n 1:0:1024M $DISK # partition 1 (boot) sgdisk -n 2:0:4G $DISK # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G $DISK # partition 3 (root - change to desired size) +sgdisk -n 3:0:$ROOT_SIZE $DISK # partition 3 (root) sgdisk -n 4:0:0 $DISK # partition 4 (home, remaining space) # set partition types @@ -56,6 +62,8 @@ mkdir /mnt/home mount ${DISK}1 /mnt/boot mount ${DISK}4 /mnt/home +cp install2.sh /mnt/ + # set download mirrors echo "-------------------------------------------------" echo "Enabling Parallel Downloads" @@ -88,4 +96,4 @@ echo "Finished install script 1. Run install2.sh" echo "-------------------------------------------------" # chroot -arch-chroot /mnt \ No newline at end of file +arch-chroot /mnt && ./install2.sh \ No newline at end of file