Fix Bootloader issues

This commit is contained in:
Thomas Cole 2021-06-30 09:36:31 -04:00
parent d1122a05f8
commit e04cd38e6d

View File

@ -21,7 +21,7 @@ MACADDRS=(
DISK="/dev/vda"
HOSTNAME="arch-testing"
USER="CLC"
USER="clc"
PASSWD="$1$8nWcCPFE$SMC36PPfImzmQ9E3WEPvy1"
ROOTPASSWD="$1$8g0M2I8t$GNnx5EkVhu1Ykw7NuKZos."
@ -66,7 +66,7 @@ prechecks () {
partition () {
echo " - Formatting disk..."
echoc " - Formatting disk..." $GREEN
#DANGER ZONE
parted --script $DISK -- mklabel gpt mkpart ESP fat32 1Mib 129MiB set 1 boot on mkpart primary ext4 129MiB 100%
@ -78,7 +78,7 @@ partition () {
mkfs.ext4 ${DISK}2
#END DANGER ZONE
echo " - Mounting partitions..."
echoc " - Mounting partitions..." $GREEN
mount ${DISK}2 /mnt
mkdir /mnt/boot
@ -87,19 +87,30 @@ partition () {
}
sysinstall () {
echo " - Updating mirror list. This might take a while."
echoc " - Updating mirror list. This might take a while." $YELLOW
reflector --protocol https --sort rate --country 'United States' --save /etc/pacman.d/mirrorlist --verbose
echo " - Installing system."
echoc " - Installing system." $GREEN
pacstrap /mnt
echo " - Installing bootloader."
echoc " - Installing bootloader." $GREEN
arch-chroot /mnt bootctl install
echo " - Updating fstab."
cat <<EOF > /mnt/boot/loader/loader.conf
default arch
EOF
cat <<EOF > /mnt/boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID=$(blkid -s PARTUUID -o value "$part_root") rw
EOF
echoc " - Updating fstab." $GREEN
genfstab -t PARTUUID /mnt >> /mnt/etc/fstab
echo " - Setting Hostname."
echoc " - Setting Hostname." $GREEN
echo "$HOSTNAME" > /mnt/etc/HOSTNAME
arch-chroot /mnt useradd -mU -s /bin/bash -G wheel,uucp,video,audio,storage,games,input $USER