efi and pkg update

This commit is contained in:
Chris Titus 2021-10-29 23:20:32 -07:00 committed by 71Zombie
parent 6b9e176800
commit 5967e4a6f3
1 changed files with 15 additions and 14 deletions

View File

@ -57,6 +57,16 @@ sgdisk -Z ${DISK} # zap all on disk
sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment
# create partitions # 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 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 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 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 pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed
genfstab -U /mnt >> /mnt/etc/fstab genfstab -U /mnt >> /mnt/etc/fstab
echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf 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 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 if [[ ! -d "/sys/firmware/efi" ]]; then
grub-install --boot-directory=/mnt/boot ${DISK} grub-install --boot-directory=/mnt/boot ${DISK}
else
grub-install --efi-directory=/mnt/boot ${DISK}
fi fi
cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
echo "--------------------------------------" echo "--------------------------------------"
echo "-- Check for low memory systems <8G --" echo "-- Check for low memory systems <8G --"
echo "--------------------------------------" echo "--------------------------------------"