From 5967e4a6f35c73ce7eb714203ccf42e929daa037 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Fri, 29 Oct 2021 23:20:32 -0700 Subject: [PATCH] efi and pkg update --- 0-preinstall.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index f4fab85..0eff65d 100644 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -57,6 +57,16 @@ sgdisk -Z ${DISK} # zap all on disk sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment # create partitions +sgdisk -n 1:0:+100M ${DISK} # partition 1 (UEFI SYS), default start block, 512MB +sgdisk -n 2:0:0 ${DISK} # partition 2 (Root), default start, remaining + +# set partition types +sgdisk -t 1:ef00 ${DISK} +sgdisk -t 2:8300 ${DISK} + +# label partitions +sgdisk -c 1:"UEFISYS" ${DISK} +sgdisk -c 2:"ROOT" ${DISK} sgdisk -n 1::+1M --typecode=1:ef02 --change-name=1:'BIOSBOOT' ${DISK} # partition 1 (BIOS Boot Partition) sgdisk -n 2::+100M --typecode=2:ef00 --change-name=2:'EFIBOOT' ${DISK} # partition 2 (UEFI Boot Partition) sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' ${DISK} # partition 3 (Root), default start, remaining @@ -107,24 +117,15 @@ echo "--------------------------------------" pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed genfstab -U /mnt >> /mnt/etc/fstab echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf -echo "--------------------------------------" -echo "-- Bootloader Systemd Installation --" -echo "--------------------------------------" -if [[ ! -d "/sys/firmware/efi" ]]; then - grub-install --boot-directory=/mnt/boot ${DISK} -else - grub-install --efi-directory=/mnt/boot ${DISK} -fi - cp -R ${SCRIPT_DIR} /mnt/root/BetterArch -bootctl install --esp-path=/mnt/boot +cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist + +echo "--------------------------------------" +echo "-- GRUB Bootloader Installation --" +echo "--------------------------------------" if [[ ! -d "/sys/firmware/efi" ]]; then grub-install --boot-directory=/mnt/boot ${DISK} -else - grub-install --efi-directory=/mnt/boot ${DISK} fi -cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus -cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" echo "-- Check for low memory systems <8G --" echo "--------------------------------------"