From 0c810bae50e8eaec3d36c4ebb5fb39ac718a7bb9 Mon Sep 17 00:00:00 2001 From: beech Date: Wed, 3 Jul 2024 23:11:00 -0500 Subject: [PATCH] Updated preinstalls --- README.md | 6 +++++- preinstall1.sh | 26 +------------------------- preinstall2.sh | 28 +++++++++++++++++++++++----- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 5a97ff6..b3b9371 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ This step installs arch to your hard drive. *IT WILL FORMAT THE DISK* curl https://git.boppdev.net/beech/ArchScripts/raw/branch/main/preinstall1.sh -o preinstall1.sh sh preinstall1.sh +arch chroot /mnt + passwd useradd -M -g users -G wheel,storage,power -S /bin/bash USERNAME passwd USERNAME @@ -25,11 +27,13 @@ echo "Defaults rootpw" >> /etc/sudoers ip link # Take note of your link name & edit in preinstall2. # Run preinstall2.sh - +sudo pacman -S curl --noconfirm --needed curl https://git.boppdev.net/beech/ArchScripts/raw/branch/main/preinstall2.sh -o preinstall2.sh nano preinstall2.sh # Edit adapter name for dhcpcd service in script sh preinstall2.sh +exit +umount -r /mnt ``` ### After First Boot diff --git a/preinstall1.sh b/preinstall1.sh index b891090..44b9256 100644 --- a/preinstall1.sh +++ b/preinstall1.sh @@ -51,7 +51,6 @@ mount /dev/sda4 /mnt/home cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup # backs up mirrorlist sudo pacman -Sy pacman-contrib --noconfirm --needed -sudo pacman -S rankmirrors --noconfirm --needed rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist # install arch @@ -66,29 +65,6 @@ echo "-------------------------------------------------" genfstab -U -p /mnt >> /mnt/etc/fstab -arch chroot /mnt # chroot - -# generate locales - -sudo pacman -S nano bash-completion --noconfirm --needed -sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen -locale-gen -echo LANG=en_US.UTF-8 > /etc/locale.conf -export LANG=en_US.UTF-8 - -# set timezone & link HW clock - -ln -S /usr/share/zoneinfo/America/Chicago > /etc/localtime -hwclock --systohc --utc - -# set hostname - -echo archdesk > /etc/hostname - -# Enable TRIM - -systemctl enable fstrim.timer - echo "-------------------------------------------------" -echo "Create user accounts using commands in README, then proceed to 2nd installer." +echo "Finished with install script 1. Please run [arch-chroot /mnt] and move on to 2nd installer." echo "-------------------------------------------------" diff --git a/preinstall2.sh b/preinstall2.sh index c5c502d..cfeec25 100644 --- a/preinstall2.sh +++ b/preinstall2.sh @@ -1,5 +1,26 @@ #!/usr/bin/env bash +# generate locales + +sudo pacman -S bash-completion --noconfirm --needed +sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen +locale-gen +echo LANG=en_US.UTF-8 > /etc/locale.conf +export LANG=en_US.UTF-8 + +# set timezone & link HW clock + +ln -S /usr/share/zoneinfo/America/Chicago > /etc/localtime +hwclock --systohc --utc + +# set hostname + +echo archdesk > /etc/hostname + +# Enable TRIM + +systemctl enable fstrim.timer + # mount efivars mount -t efivarfs efivarfs /sys/firmware/efi/efivars/ @@ -28,8 +49,5 @@ sudo systemctl enable NetworkManager.service echo "-------------------------------------------------" -echo "Arch Linux Installed & Configured - Reboot & Proceed to setup scripts" -echo "-------------------------------------------------" - -exit -umount -R /mnt \ No newline at end of file +echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot" +echo "-------------------------------------------------" \ No newline at end of file