add manual partition option

artix
Matt C 3 years ago
parent ad22793b6c
commit 91ec9a883f

@ -24,8 +24,17 @@ fi
fdisk -l | grep Disk | grep sectors --color=never fdisk -l | grep Disk | grep sectors --color=never
printf "Would you like to partition manually? (y/N): "
read PMODE
MANUAL="no"
DISK=""
if [[ "$PMODE" == "y" ]]; then
MANUAL="yes"
else
printf "Install target (will be WIPED COMPLETELY): " printf "Install target (will be WIPED COMPLETELY): "
read DISK read DISK
fi
if [[ $DISK == *"nvme"* ]]; then if [[ $DISK == *"nvme"* ]]; then
echo "Seems like this is an NVME disk. Noting" echo "Seems like this is an NVME disk. Noting"
@ -44,6 +53,7 @@ fi
echo "Setting system clock via network" echo "Setting system clock via network"
timedatectl set-ntp true timedatectl set-ntp true
if [[ "$MANUAL" == "no" ]]; then
echo "Partitioning disk" echo "Partitioning disk"
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
( (
@ -100,6 +110,24 @@ else
mount ${DISK}1 /mnt mount ${DISK}1 /mnt
fi fi
fi fi
else
echo "You have chosen manual partitioning."
echo "We're going to drop to a shell for you to partition, but first, PLEASE READ these notes."
echo "Before you exit the shell, make sure to format and mount a partition for / at /mnt"
if [[ "$EFI" == "yes" ]]; then
mkdir -p /mnt/efi
echo "Additionally, since this machine was booted with UEFI, please make sure to make a 200MB or greater partition"
echo "of type VFAT and mount it at /mnt/efi"
else
echo "Please give me the full path of the device you're planning to partition (needed for bootloader installation later)"
echo "Example: /dev/sda"
printf ": "
read DISK
fi
echo "Press enter to go to a shell."
read
bash
fi
echo "Setting up base CrystalUX System" echo "Setting up base CrystalUX System"
pacstrap /mnt base linux linux-firmware networkmanager grub crystal-grub-theme man-db man-pages texinfo nano sudo curl archlinux-keyring neofetch pacstrap /mnt base linux linux-firmware networkmanager grub crystal-grub-theme man-db man-pages texinfo nano sudo curl archlinux-keyring neofetch
@ -127,11 +155,9 @@ else
echo ${DISK} > /mnt/diskn echo ${DISK} > /mnt/diskn
fi fi
# This *should* now be handled by our patches
# to pacstrap
#cp /etc/pacman.conf /mnt/etc/.
arch-chroot /mnt /continue.sh arch-chroot /mnt /continue.sh
rm /mnt/continue.sh rm /mnt/continue.sh
echo "Installation should now be complete. Please press enter to reboot :)"
read
reboot reboot
Loading…
Cancel
Save