|
|
@ -66,6 +66,7 @@ if [[ $DISK == *"nvme"* ]]; then
|
|
|
|
else
|
|
|
|
else
|
|
|
|
NVME="no"
|
|
|
|
NVME="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "NVME=$NVME"
|
|
|
|
|
|
|
|
|
|
|
|
if ls /sys/firmware/efi/efivars > /dev/null; then
|
|
|
|
if ls /sys/firmware/efi/efivars > /dev/null; then
|
|
|
|
inf "Seems like this machine was booted with EFI. Noting"
|
|
|
|
inf "Seems like this machine was booted with EFI. Noting"
|
|
|
@ -73,6 +74,7 @@ if ls /sys/firmware/efi/efivars > /dev/null; then
|
|
|
|
else
|
|
|
|
else
|
|
|
|
EFI="no"
|
|
|
|
EFI="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "EFI=$EFI"
|
|
|
|
|
|
|
|
|
|
|
|
inf "Setting system clock via network"
|
|
|
|
inf "Setting system clock via network"
|
|
|
|
timedatectl set-ntp true
|
|
|
|
timedatectl set-ntp true
|
|
|
@ -80,30 +82,13 @@ timedatectl set-ntp true
|
|
|
|
if [[ "$MANUAL" == "no" ]]; then
|
|
|
|
if [[ "$MANUAL" == "no" ]]; then
|
|
|
|
echo "Partitioning disk"
|
|
|
|
echo "Partitioning disk"
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
if [[ "$EFI" == "yes" ]]; then
|
|
|
|
(
|
|
|
|
parted ${DISK} mklabel gpt --script
|
|
|
|
echo "g"
|
|
|
|
parted ${DISK} mkpart fat32 0 300 --script
|
|
|
|
echo "n"
|
|
|
|
parted ${DISK} mkpart ext4 300 100% --script
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "+200M"
|
|
|
|
|
|
|
|
echo "t"
|
|
|
|
|
|
|
|
echo "1"
|
|
|
|
|
|
|
|
echo "n"
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "w"
|
|
|
|
|
|
|
|
) | fdisk $DISK
|
|
|
|
|
|
|
|
inf "Partitioned ${DISK} as an EFI volume"
|
|
|
|
inf "Partitioned ${DISK} as an EFI volume"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
(
|
|
|
|
parted ${DISK} mklabel msdos --script
|
|
|
|
echo "o"
|
|
|
|
parted ${DISK} mkpart primary ext4 0% 100% --script
|
|
|
|
echo "n"
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "w"
|
|
|
|
|
|
|
|
) | fdisk $DISK
|
|
|
|
|
|
|
|
inf "Partitioned ${DISK} as an MBR volume"
|
|
|
|
inf "Partitioned ${DISK} as an MBR volume"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|