Remove reliance of external files during setup.
This commit is contained in:
parent
0495a69b7b
commit
617a51ccd4
@ -29,7 +29,7 @@ if [[ "$password" == "$password2" ]]; then
|
|||||||
echo "Credentials saved"
|
echo "Credentials saved"
|
||||||
fi
|
fi
|
||||||
# Run pacstrap and install base packages
|
# 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
|
# Create the /boot/efi directory and mount the EFI partition to it
|
||||||
mkdir /mnt/boot/efi
|
mkdir /mnt/boot/efi
|
||||||
mount /dev/$efipar /mnt/boot/efi
|
mount /dev/$efipar /mnt/boot/efi
|
||||||
@ -49,19 +49,17 @@ esac
|
|||||||
# Generate a fstab file
|
# Generate a fstab file
|
||||||
genfstab -U /mnt >> /mnt/etc/fstab
|
genfstab -U /mnt >> /mnt/etc/fstab
|
||||||
# Copy system config files into the new install
|
# Copy system config files into the new install
|
||||||
#cp files/sys-pacman.conf /mnt/etc/pacman.conf.tmp
|
#cp files/sys-environment /mnt/etc/environment
|
||||||
#cp files/sys-locale.gen /mnt/etc/locale.gen
|
#cp files/sys-grub /mnt/etc/default/grub
|
||||||
cp files/sys-environment /mnt/etc/environment
|
#cp files/sys-hosts /mnt/etc/hosts
|
||||||
cp files/sys-grub /mnt/etc/default/grub
|
#cp files/sys-network.conf /etc/sysctl.d/90-network.conf
|
||||||
cp files/sys-hosts /mnt/etc/hosts
|
#cp files/sys-mkinitcpio.conf /etc/mkinitcpio.conf
|
||||||
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
|
# Create temporary directories to store files for later use
|
||||||
mkdir /mnt/buildscripts /mnt/userfiles
|
mkdir /mnt/buildscripts /mnt/userfiles
|
||||||
cp scripts/* /mnt/buildscripts
|
cp scripts/* /mnt/buildscripts
|
||||||
cp files/user-* /mnt/userfiles
|
cp files/user-* /mnt/userfiles
|
||||||
# Chroot into the new system, do some setup based on earlier questions and run the next script
|
# Chroot into the new system and setup
|
||||||
arch-chroot /mnt /bin/bash <<EOF
|
arch-chroot /mnt /bin/bash
|
||||||
sed -i 's/^#en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen
|
sed -i 's/^#en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen
|
||||||
locale-gen
|
locale-gen
|
||||||
pacman -S --noconfirm hunspell-en_gb
|
pacman -S --noconfirm hunspell-en_gb
|
||||||
@ -70,6 +68,8 @@ hwclock --systohc
|
|||||||
echo LANG=en_GB.UTF-8 > /etc/locale.conf
|
echo LANG=en_GB.UTF-8 > /etc/locale.conf
|
||||||
echo "KEYMAP=uk" > /etc/vconsole.conf
|
echo "KEYMAP=uk" > /etc/vconsole.conf
|
||||||
echo archlinux > /etc/hostname
|
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
|
# Add "chaotic-aur" as a Pacman repository
|
||||||
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
|
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
|
||||||
pacman-key --lsign-key 3056513887B78AEB
|
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/^#Color/Color\nILoveCandy/' /etc/pacman.conf
|
||||||
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
|
sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
|
||||||
sed -i "/\[multilib\]/,/Include/"'s/^#//' /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
|
# Run full pacman sync to enable extra repos
|
||||||
pacman -Syu
|
pacman -Syu
|
||||||
# Enable NetworkManager
|
# Enable NetworkManager
|
||||||
|
Loading…
Reference in New Issue
Block a user