From d2de6bf221e1124438d38bd0464fcf98eccaaa4d Mon Sep 17 00:00:00 2001 From: 71Zombie <76274154+71Zombie@users.noreply.github.com> Date: Mon, 25 Oct 2021 08:19:50 -0400 Subject: [PATCH] Merge branch 'main' of https://github.com/ChrisTitusTech/ArchTitus into ChrisTitusTech-main --- 0-preinstall.sh | 30 ++++++++++++++++++--- 1-setup.sh | 72 +++++++++---------------------------------------- 3-post-setup.sh | 6 ++--- README.md | 2 +- 4 files changed, 43 insertions(+), 67 deletions(-) mode change 100755 => 100644 0-preinstall.sh mode change 100755 => 100644 1-setup.sh mode change 100755 => 100644 3-post-setup.sh diff --git a/0-preinstall.sh b/0-preinstall.sh old mode 100755 new mode 100644 index a38faa0..577276d --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -7,7 +7,7 @@ # ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║ # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ #------------------------------------------------------------------------- - +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo "-------------------------------------------------" echo "Setting up mirrors for optimal download " echo "-------------------------------------------------" @@ -17,7 +17,7 @@ pacman -S --noconfirm pacman-contrib terminus-font setfont ter-v22b sed -i 's/^#Para/Para/' /etc/pacman.conf pacman -S --noconfirm reflector rsync -mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup +cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup echo -e " - -----------------------------------------------------------------------------------" echo -e " ▀███▀▀▀██▄ ██ ██ ██ ███ " echo -e " ██ ██ ██ ██ ▄██▄ ██ " @@ -81,6 +81,12 @@ ls /mnt | xargs btrfs subvolume delete btrfs subvolume create /mnt/@ umount /mnt ;; +*) +echo "Rebooting in 3 Seconds ..." && sleep 1 +echo "Rebooting in 2 Seconds ..." && sleep 1 +echo "Rebooting in 1 Second ..." && sleep 1 +reboot now +;; esac # mount target @@ -89,6 +95,14 @@ mkdir /mnt/boot mkdir /mnt/boot/efi mount -t vfat -L UEFISYS /mnt/boot/ +if ! grep -qs '/mnt' /proc/mounts; then + echo "Drive is not mounted can not continue" + echo "Rebooting in 3 Seconds ..." && sleep 1 + echo "Rebooting in 2 Seconds ..." && sleep 1 + echo "Rebooting in 1 Second ..." && sleep 1 + reboot now +fi + echo "--------------------------------------" echo "-- Arch Install on Main Drive --" echo "--------------------------------------" @@ -106,8 +120,18 @@ linux /vmlinuz-linux-hardened initrd /initramfs-linux-hardened.img options root=LABEL=ROOT rw rootflags=subvol=@ EOF -cp -R ~/BetterArch /mnt/root/ +cp -R ${SCRIPT_DIR} /mnt/root/BetterArch cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" +echo "-- Check for low memory systems <8G --" +echo "--------------------------------------" +TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') +if [[ $TOTALMEM -lt 8000000 ]]; then + dd if=/dev/zero of=/swapfile bs=1M count=2048 status=progress + chmod 600 /swapfile + mkswap /swapfile + swapon /swapfile +fi +echo "--------------------------------------" echo "-- SYSTEM READY FOR 0-setup --" echo "--------------------------------------" diff --git a/1-setup.sh b/1-setup.sh old mode 100755 new mode 100644 index 9bd3605..61d8567 --- a/1-setup.sh +++ b/1-setup.sh @@ -56,6 +56,15 @@ pacman -Sy --noconfirm echo -e "\nInstalling Base System\n" PKGS=( +'mesa' # Essential Xorg First +'xorg' +'xorg-server' +'xorg-apps' +'xorg-drivers' +'xorg-xkill' +'xorg-xinit' +'xterm' +'plasma-desktop' # KDE Load second 'alsa-plugins' # audio plugins 'alsa-utils' # audio utils 'apparmor' # Security module @@ -81,15 +90,10 @@ PKGS=( 'code' # Visual Studio code 'cronie' 'cups' -'dhcpcd' 'dialog' 'discover' -'dmidecode' -'dnsmasq' 'dolphin' 'dosfstools' -'drkonqi' -'edk2-ovmf' 'efibootmgr' # EFI boot 'egl-wayland' 'exfat-utils' @@ -106,7 +110,6 @@ PKGS=( 'git' 'gparted' # partition management 'gptfdisk' -'groff' 'grub' 'grub-customizer' 'gst-libav' @@ -116,45 +119,12 @@ PKGS=( 'htop' 'iptables-nft' 'jdk-openjdk' # Java 17 -'kactivitymanagerd' 'kate' 'kvantum-qt5' -'kcalc' -'kcharselect' -'kcron' -'kde-cli-tools' 'kde-gtk-config' -'kdecoration' -'kdenetwork-filesharing' -'kdeplasma-addons' -'kdesdk-thumbnailers' -'kdialog' -'keychain' -'kfind' -'kgamma5' -'kgpg' -'khotkeys' -'kinfocenter' 'kitty' -'kmenuedit' -'kmix' 'konsole' -'kscreen' -'kscreenlocker' -'ksshaskpass' -'ksystemlog' -'ksystemstats' -'kwallet-pam' -'kwalletmanager' -'kwayland-integration' -'kwayland-server' -'kwin' -'kwrite' -'kwrited' 'layer-shell-qt' -'libguestfs' -'libkscreen' -'libksysguard' 'libnewt' 'libtool' 'linux-firmware' @@ -181,21 +151,6 @@ PKGS=( 'patch' 'picom' 'pkgconf' -'plasma-browser-integration' -'plasma-desktop' -'plasma-disks' -'plasma-firewall' -'plasma-integration' -'plasma-nm' -'plasma-pa' -'plasma-sdk' -'plasma-systemmonitor' -'plasma-thunderbolt' -'plasma-vault' -'plasma-workspace' -'plasma-workspace-wallpapers' -'polkit-kde-agent' -'powerdevil' 'powerline-fonts' 'print-manager' 'pulseaudio' @@ -214,13 +169,11 @@ PKGS=( 'synergy' 'systemsettings' 'terminus-font' -'texinfo' 'traceroute' 'ufw' 'unrar' 'unzip' 'usbutils' -'vde2' 'vim' 'virt-manager' 'virt-viewer' @@ -231,9 +184,6 @@ PKGS=( 'winetricks' 'xdg-desktop-portal-kde' 'xdg-user-dirs' -'xorg' -'xorg-server' -'xorg-xinit' 'zeroconf-ioslave' 'zip' 'zsh' @@ -282,8 +232,10 @@ if [ $(whoami) = "root" ]; then useradd -m -G wheel,libvirt -s /bin/bash $username passwd $username - cp -R /root/BetterArch /home/$username/ + cp -R /root/ArchTitus /home/$username/ chown -R $username: /home/$username/BetterArch + read -p "Please name your machine:" nameofmachine + echo $nameofmachine > /etc/hostname else echo "You are already a user proceed with aur installs" fi diff --git a/3-post-setup.sh b/3-post-setup.sh old mode 100755 new mode 100644 index 775c681..4a741e5 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -35,15 +35,15 @@ sudo systemctl enable --now portmaster # ------------------------------------------------------------------------ - -# echo -e "\nEnabling the cups service daemon so we can print" +echo -e "\nEnabling essential services" systemctl enable cups.service -#sudo ntpd -qg +sudo ntpd -qg sudo systemctl enable ntpd.service sudo systemctl disable dhcpcd.service sudo systemctl stop dhcpcd.service sudo systemctl enable NetworkManager.service +sudo systemctl enable bluetooth echo " ############################################################################### # Cleaning diff --git a/README.md b/README.md index 39a4fcc..23f420c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ __[Arch Linux Installation Guide](https://github.com/rickellis/Arch-Linux-Instal ### No Wifi ```bash -sudo wifi-menu` +sudo wifi-menu ``` ## Credits