From ea7df0ed0b1376596b9cdcbdb86b1a5c15bfc9be Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 21:05:15 -0500 Subject: [PATCH] Condensed --- install3-ex.sh | 11 +++++-- preinstall1.sh | 81 ---------------------------------------------- preinstall1nvme.sh | 81 ---------------------------------------------- preinstall2.sh | 62 ----------------------------------- preinstall2nvme.sh | 62 ----------------------------------- 5 files changed, 9 insertions(+), 288 deletions(-) delete mode 100644 preinstall1.sh delete mode 100644 preinstall1nvme.sh delete mode 100644 preinstall2.sh delete mode 100644 preinstall2nvme.sh diff --git a/install3-ex.sh b/install3-ex.sh index 84b3b80..9f5f2ed 100644 --- a/install3-ex.sh +++ b/install3-ex.sh @@ -16,8 +16,14 @@ install_software () { echo "Software installed." } +setup_aur () { + echo "Setting up Yay..." + sh aur.sh + echo "Yay installed." +} + while true; do - options=("Install GNOME + GDM" "Install KDE + SDDM" "Install Software" "Exit") + options=("Install GNOME + GDM" "Install KDE + SDDM" "Install Software" "Setup Yay" "Exit") echo "Debian Server Setup: " select opt in "${options[@]}"; do @@ -25,7 +31,8 @@ while true; do 1) install_gnome; break ;; 2) install_kde; break ;; 3) install_software; break ;; - 4) break 2 ;; + 4) setup_aur; break ;; + 5) break 2 ;; *) echo "Invalid" >&2 esac done diff --git a/preinstall1.sh b/preinstall1.sh deleted file mode 100644 index 0da9a8e..0000000 --- a/preinstall1.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -# This WILL format and partition 1 drive in your system. It is recommended to run the script with only 1 drive installed. -# Selected drive is /dev/sda, replace sda with specified drive if you have multiple. List drives with 'lsblk' -# Change boot, SWAP, and root partition sizes to your needs in lines 15-17 - -echo "-------------------------------------------------" -echo "Setting up partitions - DRIVE WILL BE WIPED" -echo "-------------------------------------------------" - -# disk prep -sgdisk -Z /dev/sda # zap all on disk -sgdisk -a 2048 -o /dev/sda # new gpt disk 2048 alignment - -# create partitions -sgdisk -n 1:0:1024M /dev/sda # partition 1 (boot) -sgdisk -n 2:0:4G /dev/sda # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G /dev/sda # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 /dev/sda # partition 4 (home, remaining space) - -# set partition types -sgdisk -t 1:ef00 /dev/sda -sgdisk -t 2:8200 /dev/sda -sgdisk -t 3:8300 /dev/sda -sgdisk -t 4:8300 /dev/sda - -# label partitions -sgdisk -c 1:"boot" /dev/sda -sgdisk -c 2:"swap" /dev/sda -sgdisk -c 3:"root" /dev/sda -sgdisk -c 4:"home" /dev/sda - -# make filesystems -echo "-------------------------------------------------" -echo "Creating Filesystems" -echo "-------------------------------------------------" - -mkfs.fat -F32 /dev/sda1 # FAT32 boot partition -mkswap /dev/sda2 # create SWAP -swapon /dev/sda2 # enable SWAP -mkfs.ext4 /dev/sda3 -mkfs.ext4 /dev/sda4 - -# mount partitions -echo "-------------------------------------------------" -echo "Mounting Partitions" -echo "-------------------------------------------------" - -mount /dev/sda3 /mnt -mkdir /mnt/boot -mkdir /mnt/home -mount /dev/sda1 /mnt/boot -mount /dev/sda4 /mnt/home - -# set download mirrors -echo "-------------------------------------------------" -echo "Setting Mirrorlist" -echo "-------------------------------------------------" - -cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup # backs up mirrorlist -sudo pacman -Syyy -sudo pacman -S pacman-contrib --noconfirm -rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist - -# install arch -echo "-------------------------------------------------" -echo "Installing to drive" -echo "-------------------------------------------------" - -pacstrap -K /mnt base linux linux-firmware base-devel --noconfirm --needed - -echo "-------------------------------------------------" -echo "Installed - Generating fstab" -echo "-------------------------------------------------" - -# generate fstab - -genfstab -U -p /mnt >> /mnt/etc/fstab - -echo "-------------------------------------------------" -echo "Finished install script 1. Please run [arch-chroot /mnt], create your user and move on to the 2nd installer." -echo "-------------------------------------------------" diff --git a/preinstall1nvme.sh b/preinstall1nvme.sh deleted file mode 100644 index d8c4bc8..0000000 --- a/preinstall1nvme.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -# This WILL format and partition 1 drive in your system. It is recommended to run the script with only 1 drive installed. -# Selected drive is /dev/nvme0n1, replace sda with specified drive if you have multiple. List drives with 'lsblk' -# Change boot, SWAP, and root partition sizes to your needs in lines 15-17 - -echo "-------------------------------------------------" -echo "Setting up partitions - DRIVE WILL BE WIPED" -echo "-------------------------------------------------" - -# disk prep -sgdisk -Z /dev/nvme0n1 # zap all on disk -sgdisk -a 2048 -o /dev/nvme0n1 # new gpt disk 2048 alignment - -# create partitions -sgdisk -n 1:0:1024M /dev/nvme0n1 # partition 1 (boot) -sgdisk -n 2:0:8G /dev/nvme0n1 # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:50G /dev/nvme0n1 # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 /dev/nvme0n1 # partition 4 (home, remaining space) - -# set partition types -sgdisk -t 1:ef00 /dev/nvme0n1 -sgdisk -t 2:8200 /dev/nvme0n1 -sgdisk -t 3:8300 /dev/nvme0n1 -sgdisk -t 4:8300 /dev/nvme0n1 - -# label partitions -sgdisk -c 1:"boot" /dev/nvme0n1 -sgdisk -c 2:"swap" /dev/nvme0n1 -sgdisk -c 3:"root" /dev/nvme0n1 -sgdisk -c 4:"home" /dev/nvme0n1 - -# make filesystems -echo "-------------------------------------------------" -echo "Creating Filesystems" -echo "-------------------------------------------------" - -mkfs.fat -F32 /dev/nvme0n1p1 # FAT32 boot partition -mkswap /dev/nvme0n1p2 # create SWAP -swapon /dev/nvme0n1p2 # enable SWAP -mkfs.ext4 /dev/nvme0n1p3 -mkfs.ext4 /dev/nvme0n1p4 - -# mount partitions -echo "-------------------------------------------------" -echo "Mounting Partitions" -echo "-------------------------------------------------" - -mount /dev/nvme0n1p3 /mnt -mkdir /mnt/boot -mkdir /mnt/home -mount /dev/nvme0n1p1 /mnt/boot -mount /dev/nvme0n1p4 /mnt/home - -# set download mirrors -echo "-------------------------------------------------" -echo "Setting Mirrorlist" -echo "-------------------------------------------------" - -cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup # backs up mirrorlist -sudo pacman -Syyy -sudo pacman -S pacman-contrib --noconfirm -rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist - -# install arch -echo "-------------------------------------------------" -echo "Installing to drive" -echo "-------------------------------------------------" - -pacstrap -K /mnt base linux linux-firmware base-devel --noconfirm --needed - -echo "-------------------------------------------------" -echo "Installed - Generating fstab" -echo "-------------------------------------------------" - -# generate fstab - -genfstab -U -p /mnt >> /mnt/etc/fstab - -echo "-------------------------------------------------" -echo "Finished install script 1. Please run [arch-chroot /mnt], create your user and move on to the 2nd installer." -echo "-------------------------------------------------" diff --git a/preinstall2.sh b/preinstall2.sh deleted file mode 100644 index 579d561..0000000 --- a/preinstall2.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -# Create your user account following the README instructions before running this. -# Edit hostname on line 26 if desired - -# File edits for user permissions - -sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -echo "Defaults rootpw" >> /etc/sudoers - -# 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 - edit archdesk with preferred hostname - -echo archdesk > /etc/hostname - -# Enable TRIM - -systemctl enable fstrim.timer - -# mount efivars - -mount -t efivarfs efivarfs /sys/firmware/efi/efivars/ - -# install bootloader - -bootctl install - -touch /boot/loader/entries/arch.conf - -echo "title Arch" > /boot/loader/entries/arch.conf -echo "linux /vmlinuz-linux" >> /boot/loader/entries/arch.conf -echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf - -echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3) rw" >> /boot/loader/entries/arch.conf - -# install dhcpd service - -sudo pacman -S dhcpcd --noconfirm --needed - -sudo systemctl enable dhcpcd@ADAPTER.service # EDIT "ADAPTER" WITH YOUR ADAPTER IN IP LINK - -# install NetworkManager - -sudo pacman -S networkmanager --noconfirm --needed -sudo systemctl enable NetworkManager.service - - -echo "-------------------------------------------------" -echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot" -echo "-------------------------------------------------" \ No newline at end of file diff --git a/preinstall2nvme.sh b/preinstall2nvme.sh deleted file mode 100644 index d4170c6..0000000 --- a/preinstall2nvme.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -# Create your user account following the README instructions before running this. -# Edit hostname on line 26 if desired - -# File edits for user permissions - -sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -echo "Defaults rootpw" >> /etc/sudoers - -# 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 - edit archdesk with preferred hostname - -echo archdesk > /etc/hostname - -# Enable TRIM - -systemctl enable fstrim.timer - -# mount efivars - -mount -t efivarfs efivarfs /sys/firmware/efi/efivars/ - -# install bootloader - -bootctl install - -touch /boot/loader/entries/arch.conf - -echo "title Arch" > /boot/loader/entries/arch.conf -echo "linux /vmlinuz-linux" >> /boot/loader/entries/arch.conf -echo "initrd /initramfs-linux.img" >> /boot/loader/entries/arch.conf - -echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/nvme0n1p3) rw" >> /boot/loader/entries/arch.conf - -# install dhcpd service - -sudo pacman -S dhcpcd --noconfirm --needed - -sudo systemctl enable dhcpcd@ADAPTER.service # EDIT "ADAPTER" WITH YOUR ADAPTER IN IP LINK - -# install NetworkManager - -sudo pacman -S networkmanager --noconfirm --needed -sudo systemctl enable NetworkManager.service - - -echo "-------------------------------------------------" -echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot" -echo "-------------------------------------------------" \ No newline at end of file