add manual partition option

artix
Matt C 4 years ago
parent ad22793b6c
commit 91ec9a883f

@ -24,8 +24,17 @@ fi
fdisk -l | grep Disk | grep sectors --color=never
printf "Install target (will be WIPED COMPLETELY): "
read DISK
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): "
read DISK
fi
if [[ $DISK == *"nvme"* ]]; then
echo "Seems like this is an NVME disk. Noting"
@ -44,8 +53,9 @@ fi
echo "Setting system clock via network"
timedatectl set-ntp true
echo "Partitioning disk"
if [[ "$EFI" == "yes" ]]; then
if [[ "$MANUAL" == "no" ]]; then
echo "Partitioning disk"
if [[ "$EFI" == "yes" ]]; then
(
echo "g"
echo "n"
@ -61,7 +71,7 @@ if [[ "$EFI" == "yes" ]]; then
echo "w"
) | fdisk $DISK
echo "Partitioned ${DISK} as an EFI volume"
else
else
(
echo "o"
echo "n"
@ -71,9 +81,9 @@ else
echo "w"
) | fdisk $DISK
echo "Partitioned ${DISK} as an MBR volume"
fi
fi
if [[ "$NVME" == "yes" ]]; then
if [[ "$NVME" == "yes" ]]; then
if [[ "$EFI" == "yes" ]]; then
echo "Initializing ${DISK} as NVME EFI"
mkfs.vfat ${DISK}p1
@ -86,7 +96,7 @@ if [[ "$NVME" == "yes" ]]; then
mkfs.ext4 ${DISK}p1
mount ${DISK}p1 /mnt
fi
else
else
if [[ "$EFI" == "yes" ]]; then
echo "Initializing ${DISK} as EFI"
mkfs.vfat ${DISK}1
@ -99,6 +109,24 @@ else
mkfs.ext4 ${DISK}1
mount ${DISK}1 /mnt
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"
@ -127,11 +155,9 @@ else
echo ${DISK} > /mnt/diskn
fi
# This *should* now be handled by our patches
# to pacstrap
#cp /etc/pacman.conf /mnt/etc/.
arch-chroot /mnt /continue.sh
rm /mnt/continue.sh
echo "Installation should now be complete. Please press enter to reboot :)"
read
reboot
Loading…
Cancel
Save