From 617a51ccd409a824e47a87f9de8dfbd8ff4feba8 Mon Sep 17 00:00:00 2001 From: Phillip Date: Sat, 7 Sep 2024 21:43:00 +0100 Subject: [PATCH] Remove reliance of external files during setup. --- scripts/0-install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/0-install.sh b/scripts/0-install.sh index 511de8b..37f0e48 100644 --- a/scripts/0-install.sh +++ b/scripts/0-install.sh @@ -29,7 +29,7 @@ if [[ "$password" == "$password2" ]]; then echo "Credentials saved" fi # Run pacstrap and install base packages -pacstrap -i /mnt base base-devel linux linux-firmware linux-headers intel-ucode git openssh rsync networkmanager grub efibootmgr dosfstools os-prober nano dkms dbus-broker-units mkinitcpio iptables-nft +pacstrap -i /mnt base base-devel linux linux-firmware linux-headers intel-ucode git openssh rsync networkmanager grub efibootmgr dosfstools os-prober nano dkms dbus-broker-units mkinitcpio iptables-nft --noconfirm --needed # Create the /boot/efi directory and mount the EFI partition to it mkdir /mnt/boot/efi mount /dev/$efipar /mnt/boot/efi @@ -49,19 +49,17 @@ esac # Generate a fstab file genfstab -U /mnt >> /mnt/etc/fstab # Copy system config files into the new install -#cp files/sys-pacman.conf /mnt/etc/pacman.conf.tmp -#cp files/sys-locale.gen /mnt/etc/locale.gen -cp files/sys-environment /mnt/etc/environment -cp files/sys-grub /mnt/etc/default/grub -cp files/sys-hosts /mnt/etc/hosts -cp files/sys-network.conf /etc/sysctl.d/90-network.conf -cp files/sys-mkinitcpio.conf /etc/mkinitcpio.conf +#cp files/sys-environment /mnt/etc/environment +#cp files/sys-grub /mnt/etc/default/grub +#cp files/sys-hosts /mnt/etc/hosts +#cp files/sys-network.conf /etc/sysctl.d/90-network.conf +#cp files/sys-mkinitcpio.conf /etc/mkinitcpio.conf # Create temporary directories to store files for later use mkdir /mnt/buildscripts /mnt/userfiles cp scripts/* /mnt/buildscripts cp files/user-* /mnt/userfiles -# Chroot into the new system, do some setup based on earlier questions and run the next script -arch-chroot /mnt /bin/bash < /etc/locale.conf echo "KEYMAP=uk" > /etc/vconsole.conf echo archlinux > /etc/hostname +echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.0.1 archlinux" >> /etc/hosts +echo -e "\n# Set terminal editor to Nano\nEDITOR=nano" >> /etc/environment # Add "chaotic-aur" as a Pacman repository pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com pacman-key --lsign-key 3056513887B78AEB @@ -79,7 +79,7 @@ pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorl sed -i 's/^#Color/Color\nILoveCandy/' /etc/pacman.conf sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf -echo "[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf +echo -e "\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf # Run full pacman sync to enable extra repos pacman -Syu # Enable NetworkManager