|
|
@ -24,8 +24,17 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
fdisk -l | grep Disk | grep sectors --color=never
|
|
|
|
fdisk -l | grep Disk | grep sectors --color=never
|
|
|
|
|
|
|
|
|
|
|
|
printf "Install target (will be WIPED COMPLETELY): "
|
|
|
|
printf "Would you like to partition manually? (y/N): "
|
|
|
|
read DISK
|
|
|
|
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
|
|
|
|
if [[ $DISK == *"nvme"* ]]; then
|
|
|
|
echo "Seems like this is an NVME disk. Noting"
|
|
|
|
echo "Seems like this is an NVME disk. Noting"
|
|
|
@ -44,8 +53,9 @@ fi
|
|
|
|
echo "Setting system clock via network"
|
|
|
|
echo "Setting system clock via network"
|
|
|
|
timedatectl set-ntp true
|
|
|
|
timedatectl set-ntp true
|
|
|
|
|
|
|
|
|
|
|
|
echo "Partitioning disk"
|
|
|
|
if [[ "$MANUAL" == "no" ]]; then
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
echo "Partitioning disk"
|
|
|
|
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
(
|
|
|
|
(
|
|
|
|
echo "g"
|
|
|
|
echo "g"
|
|
|
|
echo "n"
|
|
|
|
echo "n"
|
|
|
@ -61,7 +71,7 @@ if [[ "$EFI" == "yes" ]]; then
|
|
|
|
echo "w"
|
|
|
|
echo "w"
|
|
|
|
) | fdisk $DISK
|
|
|
|
) | fdisk $DISK
|
|
|
|
echo "Partitioned ${DISK} as an EFI volume"
|
|
|
|
echo "Partitioned ${DISK} as an EFI volume"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
(
|
|
|
|
(
|
|
|
|
echo "o"
|
|
|
|
echo "o"
|
|
|
|
echo "n"
|
|
|
|
echo "n"
|
|
|
@ -71,9 +81,9 @@ else
|
|
|
|
echo "w"
|
|
|
|
echo "w"
|
|
|
|
) | fdisk $DISK
|
|
|
|
) | fdisk $DISK
|
|
|
|
echo "Partitioned ${DISK} as an MBR volume"
|
|
|
|
echo "Partitioned ${DISK} as an MBR volume"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "$NVME" == "yes" ]]; then
|
|
|
|
if [[ "$NVME" == "yes" ]]; then
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
echo "Initializing ${DISK} as NVME EFI"
|
|
|
|
echo "Initializing ${DISK} as NVME EFI"
|
|
|
|
mkfs.vfat ${DISK}p1
|
|
|
|
mkfs.vfat ${DISK}p1
|
|
|
@ -86,7 +96,7 @@ if [[ "$NVME" == "yes" ]]; then
|
|
|
|
mkfs.ext4 ${DISK}p1
|
|
|
|
mkfs.ext4 ${DISK}p1
|
|
|
|
mount ${DISK}p1 /mnt
|
|
|
|
mount ${DISK}p1 /mnt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
echo "Initializing ${DISK} as EFI"
|
|
|
|
echo "Initializing ${DISK} as EFI"
|
|
|
|
mkfs.vfat ${DISK}1
|
|
|
|
mkfs.vfat ${DISK}1
|
|
|
@ -99,6 +109,24 @@ else
|
|
|
|
mkfs.ext4 ${DISK}1
|
|
|
|
mkfs.ext4 ${DISK}1
|
|
|
|
mount ${DISK}1 /mnt
|
|
|
|
mount ${DISK}1 /mnt
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "Setting up base CrystalUX System"
|
|
|
|
echo "Setting up base CrystalUX System"
|
|
|
@ -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
|