From a353dcc08f3bd094bc3c6fc73a33ed66726e4212 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 15:06:02 -0500 Subject: [PATCH 01/28] New installers --- install1-ex.sh | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ install2-ex.sh | 74 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 install1-ex.sh create mode 100644 install2-ex.sh diff --git a/install1-ex.sh b/install1-ex.sh new file mode 100644 index 0000000..e05fb33 --- /dev/null +++ b/install1-ex.sh @@ -0,0 +1,85 @@ +#!/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 "Arch Install Script 1 - Drive Setup" +echo "-------------------------------------------------" + +echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" + +read Diskname + +# disk prep +sgdisk -Z $Diskname # zap all on disk +sgdisk -a 2048 -o $Diskname # new gpt disk 2048 alignment + +# create partitions +sgdisk -n 1:0:1024M $Diskname # partition 1 (boot) +sgdisk -n 2:0:4G $Diskname # partition 2 (SWAP - change to desired size) +sgdisk -n 3:0:35G $Diskname # partition 3 (root - change to desired size) +sgdisk -n 4:0:0 $Diskname # partition 4 (home, remaining space) + +# set partition types +sgdisk -t 1:ef00 $Diskname +sgdisk -t 2:8200 $Diskname +sgdisk -t 3:8300 $Diskname +sgdisk -t 4:8300 $Diskname + +# label partitions +sgdisk -c 1:"boot" $Diskname +sgdisk -c 2:"swap" $Diskname +sgdisk -c 3:"root" $Diskname +sgdisk -c 4:"home" $Diskname + +# make filesystems +echo "-------------------------------------------------" +echo "Creating Filesystems" +echo "-------------------------------------------------" + +mkfs.fat -F32 $(Diskname)1 # FAT32 boot partition +mkswap $(Diskname)2 # create SWAP +swapon $(Diskname)2 # enable SWAP +mkfs.ext4 $(Diskname)3 +mkfs.ext4 $(Diskname)4 + +# mount partitions +echo "-------------------------------------------------" +echo "Mounting Partitions" +echo "-------------------------------------------------" + +mount $(Diskname)3 /mnt +mkdir /mnt/boot +mkdir /mnt/home +mount $(Diskname)1 /mnt/boot +mount $(Diskname)4 /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], and move on to the 2nd installer." +echo "-------------------------------------------------" diff --git a/install2-ex.sh b/install2-ex.sh new file mode 100644 index 0000000..24a8e71 --- /dev/null +++ b/install2-ex.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Create your user account following the README instructions before running this. +# Edit hostname on line 26 if desired + +echo "Specify drive name that you entered in the first script." + +read Diskname + +echo "Create a root password (not your user password)." + +passwd + +echo "Create user account" + +read Username + +useradd -m -g users -G wheel,storage,power -s /bin/bash $Username + +echo "Create a user password (should be different from root)." + +passwd $Username + +# 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 $(Diskname)3) rw" >> /boot/loader/entries/arch.conf + +# 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 -- 2.36.2 From 994c9345c62e2fff3e55d11b6caea1c32282ad8a Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 15:42:38 -0500 Subject: [PATCH 02/28] Edit --- install1-ex.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index e05fb33..26517b4 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -9,29 +9,29 @@ echo "-------------------------------------------------" echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" -read Diskname +read -p "Enter disk name: " Diskname # disk prep -sgdisk -Z $Diskname # zap all on disk -sgdisk -a 2048 -o $Diskname # new gpt disk 2048 alignment +sgdisk -Z $(Diskname) # zap all on disk +sgdisk -a 2048 -o $(Diskname) # new gpt disk 2048 alignment # create partitions -sgdisk -n 1:0:1024M $Diskname # partition 1 (boot) -sgdisk -n 2:0:4G $Diskname # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G $Diskname # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 $Diskname # partition 4 (home, remaining space) +sgdisk -n 1:0:1024M $(Diskname) # partition 1 (boot) +sgdisk -n 2:0:4G $(Diskname) # partition 2 (SWAP - change to desired size) +sgdisk -n 3:0:35G $(Diskname) # partition 3 (root - change to desired size) +sgdisk -n 4:0:0 $(Diskname) # partition 4 (home, remaining space) # set partition types -sgdisk -t 1:ef00 $Diskname -sgdisk -t 2:8200 $Diskname -sgdisk -t 3:8300 $Diskname -sgdisk -t 4:8300 $Diskname +sgdisk -t 1:ef00 $(Diskname) +sgdisk -t 2:8200 $(Diskname) +sgdisk -t 3:8300 $(Diskname) +sgdisk -t 4:8300 $(Diskname) # label partitions -sgdisk -c 1:"boot" $Diskname -sgdisk -c 2:"swap" $Diskname -sgdisk -c 3:"root" $Diskname -sgdisk -c 4:"home" $Diskname +sgdisk -c 1:"boot" $(Diskname) +sgdisk -c 2:"swap" $(Diskname) +sgdisk -c 3:"root" $(Diskname) +sgdisk -c 4:"home" $(Diskname) # make filesystems echo "-------------------------------------------------" -- 2.36.2 From 3ff7173269727cd866abe7512d92a1bfa7e43e7e Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 15:43:25 -0500 Subject: [PATCH 03/28] Reverted edits --- install1-ex.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 26517b4..c491045 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -12,26 +12,26 @@ echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORM read -p "Enter disk name: " Diskname # disk prep -sgdisk -Z $(Diskname) # zap all on disk -sgdisk -a 2048 -o $(Diskname) # new gpt disk 2048 alignment +sgdisk -Z $Diskname # zap all on disk +sgdisk -a 2048 -o $Diskname # new gpt disk 2048 alignment # create partitions -sgdisk -n 1:0:1024M $(Diskname) # partition 1 (boot) -sgdisk -n 2:0:4G $(Diskname) # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G $(Diskname) # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 $(Diskname) # partition 4 (home, remaining space) +sgdisk -n 1:0:1024M $Diskname # partition 1 (boot) +sgdisk -n 2:0:4G $Diskname # partition 2 (SWAP - change to desired size) +sgdisk -n 3:0:35G $Diskname # partition 3 (root - change to desired size) +sgdisk -n 4:0:0 $Diskname # partition 4 (home, remaining space) # set partition types -sgdisk -t 1:ef00 $(Diskname) -sgdisk -t 2:8200 $(Diskname) -sgdisk -t 3:8300 $(Diskname) -sgdisk -t 4:8300 $(Diskname) +sgdisk -t 1:ef00 $Diskname +sgdisk -t 2:8200 $Diskname +sgdisk -t 3:8300 $Diskname +sgdisk -t 4:8300 $Diskname # label partitions -sgdisk -c 1:"boot" $(Diskname) -sgdisk -c 2:"swap" $(Diskname) -sgdisk -c 3:"root" $(Diskname) -sgdisk -c 4:"home" $(Diskname) +sgdisk -c 1:"boot" $Diskname +sgdisk -c 2:"swap" $Diskname +sgdisk -c 3:"root" $Diskname +sgdisk -c 4:"home" $Diskname # make filesystems echo "-------------------------------------------------" -- 2.36.2 From 9ca507535d03485d441abe74b1a0a05908821caa Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 15:47:30 -0500 Subject: [PATCH 04/28] Fixes --- install1-ex.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index c491045..58b5f25 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -38,22 +38,22 @@ echo "-------------------------------------------------" echo "Creating Filesystems" echo "-------------------------------------------------" -mkfs.fat -F32 $(Diskname)1 # FAT32 boot partition -mkswap $(Diskname)2 # create SWAP -swapon $(Diskname)2 # enable SWAP -mkfs.ext4 $(Diskname)3 -mkfs.ext4 $(Diskname)4 +mkfs.fat -F32 "$(Diskname)1" # FAT32 boot partition +mkswap "$(Diskname)2" # create SWAP +swapon "$(Diskname)2" # enable SWAP +mkfs.ext4 "$(Diskname)3" +mkfs.ext4 "$(Diskname)4" # mount partitions echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" -mount $(Diskname)3 /mnt +mount "$(Diskname)3" /mnt mkdir /mnt/boot mkdir /mnt/home -mount $(Diskname)1 /mnt/boot -mount $(Diskname)4 /mnt/home +mount "$(Diskname)1" /mnt/boot +mount "$(Diskname)4" /mnt/home # set download mirrors echo "-------------------------------------------------" -- 2.36.2 From 169a888a8c7f18ea52b32f6f50344def43926573 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 15:56:32 -0500 Subject: [PATCH 05/28] Fix2 --- install1-ex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install1-ex.sh b/install1-ex.sh index 58b5f25..9ff2b1d 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -9,7 +9,7 @@ echo "-------------------------------------------------" echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" -read -p "Enter disk name: " Diskname +read Diskname # disk prep sgdisk -Z $Diskname # zap all on disk -- 2.36.2 From 52b9ff26c970b96cd3ee86fcc0b2516ee73ed76d Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 15:58:56 -0500 Subject: [PATCH 06/28] Fix3 --- install1-ex.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install1-ex.sh b/install1-ex.sh index 9ff2b1d..89a4e06 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -11,6 +11,8 @@ echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORM read Diskname +pacman -S --noconfirm gptfdisk + # disk prep sgdisk -Z $Diskname # zap all on disk sgdisk -a 2048 -o $Diskname # new gpt disk 2048 alignment -- 2.36.2 From 110b98543e09b949006aa2fe459c3524f4a8b219 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 16:10:20 -0500 Subject: [PATCH 07/28] Fix4 --- install1-ex.sh | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 89a4e06..d1ee278 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -11,40 +11,38 @@ echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORM read Diskname -pacman -S --noconfirm gptfdisk +echo -e "\nFormatting disk...\n$HR" # disk prep -sgdisk -Z $Diskname # zap all on disk -sgdisk -a 2048 -o $Diskname # new gpt disk 2048 alignment +sgdisk -Z $(Diskname) # zap all on disk +sgdisk -a 2048 -o $(Diskname) # new gpt disk 2048 alignment # create partitions -sgdisk -n 1:0:1024M $Diskname # partition 1 (boot) -sgdisk -n 2:0:4G $Diskname # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G $Diskname # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 $Diskname # partition 4 (home, remaining space) +sgdisk -n 1:0:1024M $(Diskname) # partition 1 (boot) +sgdisk -n 2:0:4G $(Diskname) # partition 2 (SWAP - change to desired size) +sgdisk -n 3:0:35G $(Diskname) # partition 3 (root - change to desired size) +sgdisk -n 4:0:0 $(Diskname) # partition 4 (home, remaining space) # set partition types -sgdisk -t 1:ef00 $Diskname -sgdisk -t 2:8200 $Diskname -sgdisk -t 3:8300 $Diskname -sgdisk -t 4:8300 $Diskname +sgdisk -t 1:ef00 $(Diskname) +sgdisk -t 2:8200 $(Diskname) +sgdisk -t 3:8300 $(Diskname) +sgdisk -t 4:8300 $(Diskname) # label partitions -sgdisk -c 1:"boot" $Diskname -sgdisk -c 2:"swap" $Diskname -sgdisk -c 3:"root" $Diskname -sgdisk -c 4:"home" $Diskname +sgdisk -c 1:"boot" $(Diskname) +sgdisk -c 2:"swap" $(Diskname) +sgdisk -c 3:"root" $(Diskname) +sgdisk -c 4:"home" $(Diskname) # make filesystems -echo "-------------------------------------------------" -echo "Creating Filesystems" -echo "-------------------------------------------------" +echo -e "\nCreating Filesystems...\n$HR" -mkfs.fat -F32 "$(Diskname)1" # FAT32 boot partition +mkfs.fat -F32 -n "$(Diskname)1" # FAT32 boot partition mkswap "$(Diskname)2" # create SWAP swapon "$(Diskname)2" # enable SWAP -mkfs.ext4 "$(Diskname)3" -mkfs.ext4 "$(Diskname)4" +mkfs.ext4 -L "$(Diskname)3" +mkfs.ext4 -L "$(Diskname)4" # mount partitions echo "-------------------------------------------------" -- 2.36.2 From 210660f79f7f5e7c227b8bd94db6b84b4ba0d6ba Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 16:11:40 -0500 Subject: [PATCH 08/28] Fix5 --- install1-ex.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index d1ee278..eac4cb1 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -38,11 +38,11 @@ sgdisk -c 4:"home" $(Diskname) # make filesystems echo -e "\nCreating Filesystems...\n$HR" -mkfs.fat -F32 -n "$(Diskname)1" # FAT32 boot partition +mkfs.fat -F32 "$(Diskname)1" # FAT32 boot partition mkswap "$(Diskname)2" # create SWAP swapon "$(Diskname)2" # enable SWAP -mkfs.ext4 -L "$(Diskname)3" -mkfs.ext4 -L "$(Diskname)4" +mkfs.ext4 "$(Diskname)3" +mkfs.ext4 "$(Diskname)4" # mount partitions echo "-------------------------------------------------" -- 2.36.2 From a1000ca2758629f48aa4a56fa307a769c3cb541e Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 16:33:03 -0500 Subject: [PATCH 09/28] Updated read --- install1-ex.sh | 46 +++++++++++++++++++++++----------------------- install2-ex.sh | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index eac4cb1..a3881ee 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -9,51 +9,51 @@ echo "-------------------------------------------------" echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" -read Diskname +read DISK echo -e "\nFormatting disk...\n$HR" # disk prep -sgdisk -Z $(Diskname) # zap all on disk -sgdisk -a 2048 -o $(Diskname) # new gpt disk 2048 alignment +sgdisk -Z $(DISK) # zap all on disk +sgdisk -a 2048 -o $(DISK) # new gpt disk 2048 alignment # create partitions -sgdisk -n 1:0:1024M $(Diskname) # partition 1 (boot) -sgdisk -n 2:0:4G $(Diskname) # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G $(Diskname) # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 $(Diskname) # partition 4 (home, remaining space) +sgdisk -n 1:0:1024M $(DISK) # partition 1 (boot) +sgdisk -n 2:0:4G $(DISK) # partition 2 (SWAP - change to desired size) +sgdisk -n 3:0:35G $(DISK) # partition 3 (root - change to desired size) +sgdisk -n 4:0:0 $(DISK) # partition 4 (home, remaining space) # set partition types -sgdisk -t 1:ef00 $(Diskname) -sgdisk -t 2:8200 $(Diskname) -sgdisk -t 3:8300 $(Diskname) -sgdisk -t 4:8300 $(Diskname) +sgdisk -t 1:ef00 $(DISK) +sgdisk -t 2:8200 $(DISK) +sgdisk -t 3:8300 $(DISK) +sgdisk -t 4:8300 $(DISK) # label partitions -sgdisk -c 1:"boot" $(Diskname) -sgdisk -c 2:"swap" $(Diskname) -sgdisk -c 3:"root" $(Diskname) -sgdisk -c 4:"home" $(Diskname) +sgdisk -c 1:"boot" $(DISK) +sgdisk -c 2:"swap" $(DISK) +sgdisk -c 3:"root" $(DISK) +sgdisk -c 4:"home" $(DISK) # make filesystems echo -e "\nCreating Filesystems...\n$HR" -mkfs.fat -F32 "$(Diskname)1" # FAT32 boot partition -mkswap "$(Diskname)2" # create SWAP -swapon "$(Diskname)2" # enable SWAP -mkfs.ext4 "$(Diskname)3" -mkfs.ext4 "$(Diskname)4" +mkfs.fat -F32 "$(DISK)1" # FAT32 boot partition +mkswap "$(DISK)2" # create SWAP +swapon "$(DISK)2" # enable SWAP +mkfs.ext4 "$(DISK)3" +mkfs.ext4 "$(DISK)4" # mount partitions echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" -mount "$(Diskname)3" /mnt +mount "$(DISK)3" /mnt mkdir /mnt/boot mkdir /mnt/home -mount "$(Diskname)1" /mnt/boot -mount "$(Diskname)4" /mnt/home +mount "$(DISK)1" /mnt/boot +mount "$(DISK)4" /mnt/home # set download mirrors echo "-------------------------------------------------" diff --git a/install2-ex.sh b/install2-ex.sh index 24a8e71..ede09b6 100644 --- a/install2-ex.sh +++ b/install2-ex.sh @@ -5,7 +5,7 @@ echo "Specify drive name that you entered in the first script." -read Diskname +read DISK echo "Create a root password (not your user password)." @@ -61,7 +61,7 @@ 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 $(Diskname)3) rw" >> /boot/loader/entries/arch.conf +echo "options root=PARTUUID=$(blkid -s PARTUUID -o value $(DISK)3) rw" >> /boot/loader/entries/arch.conf # install NetworkManager -- 2.36.2 From 31e4ddb38a4537e2cd55f5243f9748122b6ca326 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 16:42:35 -0500 Subject: [PATCH 10/28] Update --- install1-ex.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index a3881ee..53ca331 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -3,6 +3,16 @@ # 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 +# 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 + echo "-------------------------------------------------" echo "Arch Install Script 1 - Drive Setup" echo "-------------------------------------------------" @@ -55,16 +65,6 @@ mkdir /mnt/home mount "$(DISK)1" /mnt/boot mount "$(DISK)4" /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" -- 2.36.2 From dd423a4923855c5c0aed403f31548f724cd1211d Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 16:52:55 -0500 Subject: [PATCH 11/28] Fixes --- install1-ex.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 53ca331..c0ad0b5 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -19,31 +19,31 @@ echo "-------------------------------------------------" echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" -read DISK +read -r DISK echo -e "\nFormatting disk...\n$HR" # disk prep -sgdisk -Z $(DISK) # zap all on disk -sgdisk -a 2048 -o $(DISK) # new gpt disk 2048 alignment +sgdisk -Z $DISK # zap all on disk +sgdisk -a 2048 -o $DISK # new gpt disk 2048 alignment # create partitions -sgdisk -n 1:0:1024M $(DISK) # partition 1 (boot) -sgdisk -n 2:0:4G $(DISK) # partition 2 (SWAP - change to desired size) -sgdisk -n 3:0:35G $(DISK) # partition 3 (root - change to desired size) -sgdisk -n 4:0:0 $(DISK) # partition 4 (home, remaining space) +sgdisk -n 1:0:1024M $DISK # partition 1 (boot) +sgdisk -n 2:0:4G $DISK # partition 2 (SWAP - change to desired size) +sgdisk -n 3:0:35G $DISK # partition 3 (root - change to desired size) +sgdisk -n 4:0:0 $DISK # partition 4 (home, remaining space) # set partition types -sgdisk -t 1:ef00 $(DISK) -sgdisk -t 2:8200 $(DISK) -sgdisk -t 3:8300 $(DISK) -sgdisk -t 4:8300 $(DISK) +sgdisk -t 1:ef00 $DISK +sgdisk -t 2:8200 $DISK +sgdisk -t 3:8300 $DISK +sgdisk -t 4:8300 $DISK # label partitions -sgdisk -c 1:"boot" $(DISK) -sgdisk -c 2:"swap" $(DISK) -sgdisk -c 3:"root" $(DISK) -sgdisk -c 4:"home" $(DISK) +sgdisk -c 1:"boot" $DISK +sgdisk -c 2:"swap" $DISK +sgdisk -c 3:"root" $DISK +sgdisk -c 4:"home" $DISK # make filesystems echo -e "\nCreating Filesystems...\n$HR" -- 2.36.2 From 76d2831a5fd90d47c56a22f0285f7e79d6e7948a Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 16:55:50 -0500 Subject: [PATCH 12/28] Fixes --- install1-ex.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index c0ad0b5..3ad7763 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -48,22 +48,22 @@ sgdisk -c 4:"home" $DISK # make filesystems echo -e "\nCreating Filesystems...\n$HR" -mkfs.fat -F32 "$(DISK)1" # FAT32 boot partition -mkswap "$(DISK)2" # create SWAP -swapon "$(DISK)2" # enable SWAP -mkfs.ext4 "$(DISK)3" -mkfs.ext4 "$(DISK)4" +mkfs.fat -F32 ""$(DISK)1"" # FAT32 boot partition +mkswap ""$(DISK)2"" # create SWAP +swapon ""$(DISK)2"" # enable SWAP +mkfs.ext4 ""$(DISK)3"" +mkfs.ext4 ""$(DISK)4"" # mount partitions echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" -mount "$(DISK)3" /mnt +mount ""$(DISK)3"" /mnt mkdir /mnt/boot mkdir /mnt/home -mount "$(DISK)1" /mnt/boot -mount "$(DISK)4" /mnt/home +mount ""$(DISK)1"" /mnt/boot +mount ""$(DISK)4"" /mnt/home # install arch echo "-------------------------------------------------" -- 2.36.2 From adc453a6cfa193c5237e0b5be24f43623e2fb6d1 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 20:00:55 -0500 Subject: [PATCH 13/28] Updates --- install1-ex.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 3ad7763..6be409c 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -48,22 +48,22 @@ sgdisk -c 4:"home" $DISK # make filesystems echo -e "\nCreating Filesystems...\n$HR" -mkfs.fat -F32 ""$(DISK)1"" # FAT32 boot partition -mkswap ""$(DISK)2"" # create SWAP -swapon ""$(DISK)2"" # enable SWAP -mkfs.ext4 ""$(DISK)3"" -mkfs.ext4 ""$(DISK)4"" +mkfs.fat -F32 -n "boot" $(DISK)1 # FAT32 boot partition +mkswap -L swap $(DISK)2 # create SWAP +swapon -L swap # enable SWAP +mkfs.ext4 -L root $(DISK)3 +mkfs.ext4 -L home $(DISK)4 # mount partitions echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" -mount ""$(DISK)3"" /mnt +mount -t ext4 $(DISK)3 /mnt mkdir /mnt/boot mkdir /mnt/home -mount ""$(DISK)1"" /mnt/boot -mount ""$(DISK)4"" /mnt/home +mount $(DISK)1 /mnt/boot +mount $(DISK)4 /mnt/home # install arch echo "-------------------------------------------------" -- 2.36.2 From d7f4fc77da452cdb145cd6de8a8b3a49ec2a7059 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 20:07:57 -0500 Subject: [PATCH 14/28] Rollback --- install1-ex.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 6be409c..c0ad0b5 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -48,22 +48,22 @@ sgdisk -c 4:"home" $DISK # make filesystems echo -e "\nCreating Filesystems...\n$HR" -mkfs.fat -F32 -n "boot" $(DISK)1 # FAT32 boot partition -mkswap -L swap $(DISK)2 # create SWAP -swapon -L swap # enable SWAP -mkfs.ext4 -L root $(DISK)3 -mkfs.ext4 -L home $(DISK)4 +mkfs.fat -F32 "$(DISK)1" # FAT32 boot partition +mkswap "$(DISK)2" # create SWAP +swapon "$(DISK)2" # enable SWAP +mkfs.ext4 "$(DISK)3" +mkfs.ext4 "$(DISK)4" # mount partitions echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" -mount -t ext4 $(DISK)3 /mnt +mount "$(DISK)3" /mnt mkdir /mnt/boot mkdir /mnt/home -mount $(DISK)1 /mnt/boot -mount $(DISK)4 /mnt/home +mount "$(DISK)1" /mnt/boot +mount "$(DISK)4" /mnt/home # install arch echo "-------------------------------------------------" -- 2.36.2 From 243b4525508956e62c93e47fca72b295fc6d734b Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 20:10:56 -0500 Subject: [PATCH 15/28] Fix variable --- install1-ex.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install1-ex.sh b/install1-ex.sh index c0ad0b5..31c195c 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -19,7 +19,7 @@ echo "-------------------------------------------------" echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" -read -r DISK +read -r -p "Enter the disk: " DISK echo -e "\nFormatting disk...\n$HR" @@ -48,6 +48,8 @@ sgdisk -c 4:"home" $DISK # make filesystems echo -e "\nCreating Filesystems...\n$HR" +parted $DISK mklabel gpt + mkfs.fat -F32 "$(DISK)1" # FAT32 boot partition mkswap "$(DISK)2" # create SWAP swapon "$(DISK)2" # enable SWAP -- 2.36.2 From 278e19425878da0cd698ee57353c4a5b02f366e8 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 20:13:30 -0500 Subject: [PATCH 16/28] Variable fix --- install1-ex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install1-ex.sh b/install1-ex.sh index 31c195c..1ebdd50 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -49,7 +49,6 @@ sgdisk -c 4:"home" $DISK echo -e "\nCreating Filesystems...\n$HR" parted $DISK mklabel gpt - mkfs.fat -F32 "$(DISK)1" # FAT32 boot partition mkswap "$(DISK)2" # create SWAP swapon "$(DISK)2" # enable SWAP @@ -61,6 +60,7 @@ echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" +parted $DISK mklabel gpt mount "$(DISK)3" /mnt mkdir /mnt/boot mkdir /mnt/home -- 2.36.2 From d3c67c2ae2f9eba228544e98956637fc68010444 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 20:19:18 -0500 Subject: [PATCH 17/28] Brackets --- install1-ex.sh | 19 +++++++++---------- install2-ex.sh | 5 +++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 1ebdd50..3d88c18 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -17,6 +17,7 @@ echo "-------------------------------------------------" echo "Arch Install Script 1 - Drive Setup" echo "-------------------------------------------------" +lsblk echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" read -r -p "Enter the disk: " DISK @@ -48,24 +49,22 @@ sgdisk -c 4:"home" $DISK # make filesystems echo -e "\nCreating Filesystems...\n$HR" -parted $DISK mklabel gpt -mkfs.fat -F32 "$(DISK)1" # FAT32 boot partition -mkswap "$(DISK)2" # create SWAP -swapon "$(DISK)2" # enable SWAP -mkfs.ext4 "$(DISK)3" -mkfs.ext4 "$(DISK)4" +mkfs.fat -F32 ${DISK}1 # FAT32 boot partition +mkswap ${DISK}2 # create SWAP +swapon ${DISK}2 # enable SWAP +mkfs.ext4 ${DISK}3 +mkfs.ext4 ${DISK}4 # mount partitions echo "-------------------------------------------------" echo "Mounting Partitions" echo "-------------------------------------------------" -parted $DISK mklabel gpt -mount "$(DISK)3" /mnt +mount ${DISK}3 /mnt mkdir /mnt/boot mkdir /mnt/home -mount "$(DISK)1" /mnt/boot -mount "$(DISK)4" /mnt/home +mount ${DISK}1 /mnt/boot +mount ${DISK}4 /mnt/home # install arch echo "-------------------------------------------------" diff --git a/install2-ex.sh b/install2-ex.sh index ede09b6..423758b 100644 --- a/install2-ex.sh +++ b/install2-ex.sh @@ -3,9 +3,10 @@ # Create your user account following the README instructions before running this. # Edit hostname on line 26 if desired +lsblk echo "Specify drive name that you entered in the first script." -read DISK +read -r -p "Enter the disk: " DISK echo "Create a root password (not your user password)." @@ -61,7 +62,7 @@ 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 $(DISK)3) rw" >> /boot/loader/entries/arch.conf +echo "options root=PARTUUID=$(blkid -s PARTUUID -o value ${DISK}3) rw" >> /boot/loader/entries/arch.conf # install NetworkManager -- 2.36.2 From 36bcbf6094c3a1402c60297d2986fc3bbc3491cf Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 20:27:42 -0500 Subject: [PATCH 18/28] V1 --- install1-ex.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install1-ex.sh b/install1-ex.sh index 3d88c18..52cb3e9 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -3,16 +3,6 @@ # 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 -# 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 - echo "-------------------------------------------------" echo "Arch Install Script 1 - Drive Setup" echo "-------------------------------------------------" @@ -66,6 +56,16 @@ mkdir /mnt/home mount ${DISK}1 /mnt/boot mount ${DISK}4 /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" -- 2.36.2 From 3acc0c60c4f945814542b8b5b1cb6e0c635f8611 Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 21:01:52 -0500 Subject: [PATCH 19/28] Added install3 --- setup-gnome.sh => gnomesetup.sh | 1 + install1-ex.sh | 2 +- install2-ex.sh | 10 ++++++++-- install3-ex.sh | 34 +++++++++++++++++++++++++++++++++ setup-kde.sh => kdesetup.sh | 1 + 5 files changed, 45 insertions(+), 3 deletions(-) rename setup-gnome.sh => gnomesetup.sh (98%) create mode 100644 install3-ex.sh rename setup-kde.sh => kdesetup.sh (98%) diff --git a/setup-gnome.sh b/gnomesetup.sh similarity index 98% rename from setup-gnome.sh rename to gnomesetup.sh index 3715aec..0af1799 100644 --- a/setup-gnome.sh +++ b/gnomesetup.sh @@ -57,6 +57,7 @@ for PKG in "${PKGS[@]}"; do sudo pacman -S "$PKG" --noconfirm --needed done +sudo systemctl disable sddm.service sudo systemctl enable gdm.service echo diff --git a/install1-ex.sh b/install1-ex.sh index 52cb3e9..cc3b6b1 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -8,7 +8,7 @@ echo "Arch Install Script 1 - Drive Setup" echo "-------------------------------------------------" lsblk -echo "Specify drive name for install(ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" +echo "Specify drive name for install (ex. /dev/sda, /dev/nvme0n1). THIS WILL FORMAT & PARTITION THE SPECIFIED DRIVE!" read -r -p "Enter the disk: " DISK diff --git a/install2-ex.sh b/install2-ex.sh index 423758b..dce7176 100644 --- a/install2-ex.sh +++ b/install2-ex.sh @@ -42,7 +42,11 @@ hwclock --systohc --utc # set hostname - edit archdesk with preferred hostname -echo archdesk > /etc/hostname +echo "Set hostname." + +read -r -p "Enter the hostname: " HOSTNAME + +echo ${HOSTNAME} > /etc/hostname # Enable TRIM @@ -67,8 +71,10 @@ echo "options root=PARTUUID=$(blkid -s PARTUUID -o value ${DISK}3) rw" >> /boot/ # install NetworkManager sudo pacman -S networkmanager --noconfirm --needed +sudo systemctl disable dhcpcd.ervice +sudo systemctl stop dhcpcd.service sudo systemctl enable NetworkManager.service - +sudo systemctl start NetworkManager.service echo "-------------------------------------------------" echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot" diff --git a/install3-ex.sh b/install3-ex.sh new file mode 100644 index 0000000..84b3b80 --- /dev/null +++ b/install3-ex.sh @@ -0,0 +1,34 @@ +install_gnome () { + echo "Setting up GNOME + GDM..." + sh gnomesetup.sh + echo "Gnome installed & GDM enabled on reboot." +} + +install_kde () { + echo "Setting up KDE + SDDM..." + sh kdesetup.sh + echo "KDE installed + SDDM enabled on reboot" +} + +install_software () { + echo "Setting up KDE + SDDM..." + sh software.sh + echo "Software installed." +} + +while true; do + options=("Install GNOME + GDM" "Install KDE + SDDM" "Install Software" "Exit") + + echo "Debian Server Setup: " + select opt in "${options[@]}"; do + case $REPLY in + 1) install_gnome; break ;; + 2) install_kde; break ;; + 3) install_software; break ;; + 4) break 2 ;; + *) echo "Invalid" >&2 + esac + done +done + +echo "Exiting! Please reboot to enter desktop environment." diff --git a/setup-kde.sh b/kdesetup.sh similarity index 98% rename from setup-kde.sh rename to kdesetup.sh index d0c3c94..efd46b9 100644 --- a/setup-kde.sh +++ b/kdesetup.sh @@ -57,6 +57,7 @@ for PKG in "${PKGS[@]}"; do sudo pacman -S "$PKG" --noconfirm --needed done +sudo systemctl disable gdm.service sudo systemctl enable sddm.service echo -- 2.36.2 From ea7df0ed0b1376596b9cdcbdb86b1a5c15bfc9be Mon Sep 17 00:00:00 2001 From: beech Date: Fri, 13 Sep 2024 21:05:15 -0500 Subject: [PATCH 20/28] 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 -- 2.36.2 From 305d21850eada46bd8fa348964a0bcfe43fb0307 Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 03:10:39 -0500 Subject: [PATCH 21/28] Finalizing --- install2-ex.sh | 3 +-- nvidia.sh | 27 --------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 nvidia.sh diff --git a/install2-ex.sh b/install2-ex.sh index dce7176..327a41f 100644 --- a/install2-ex.sh +++ b/install2-ex.sh @@ -71,8 +71,7 @@ echo "options root=PARTUUID=$(blkid -s PARTUUID -o value ${DISK}3) rw" >> /boot/ # install NetworkManager sudo pacman -S networkmanager --noconfirm --needed -sudo systemctl disable dhcpcd.ervice -sudo systemctl stop dhcpcd.service +sudo pacman -S git --noconfirm --needed sudo systemctl enable NetworkManager.service sudo systemctl start NetworkManager.service diff --git a/nvidia.sh b/nvidia.sh deleted file mode 100644 index 3a18346..0000000 --- a/nvidia.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -echo "-------------------------------------------------" -echo "Installing Nvidia Graphics Drivers" -echo "-------------------------------------------------" - -sudo pacman -S linux-headers --noconfirm -sudo pacman -S nvidia-dkms libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings --noconfirm - -sed -i 's/^MODULES=()/MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf -# sed -i 's/^ rw/ rw nvidia-drm.modeset=1/' /boot/loader/entries/arch.conf - -sudo mkdir /etc/pacman.d/hooks -touch /etc/pacman.d/hooks/nvidia.hook -echo "[Trigger]" > /etc/pacman.d/hooks/nvidia.hook -echo "Operation=Install" >> /etc/pacman.d/hooks/nvidia.hook -echo "Operation=Upgrade" >> /etc/pacman.d/hooks/nvidia.hook -echo "Operation=Remove" >> /etc/pacman.d/hooks/nvidia.hook -echo "Type=Package" >> /etc/pacman.d/hooks/nvidia.hook -echo "Target=nvidia" >> /etc/pacman.d/hooks/nvidia.hook -echo "[Action]" >> /etc/pacman.d/hooks/nvidia.hook -echo "Depends=mkinitcpio" >> /etc/pacman.d/hooks/nvidia.hook -echo "When=PostTransaction" >> /etc/pacman.d/hooks/nvidia.hook -echo "Exec=/usr/bin/mkinitcpio -P" >> /etc/pacman.d/hooks/nvidia.hook - -echo "-------------------------------------------------" -echo "Done. Please edit /boot/loader/entries/arch.conf before exiting" -echo "-------------------------------------------------" \ No newline at end of file -- 2.36.2 From 990bdc7705374110c4c692d521ab4233aca23c9c Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 03:16:31 -0500 Subject: [PATCH 22/28] Updated README --- README.md | 49 +++++++------------------------------------------ 1 file changed, 7 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 4787935..5340ac3 100644 --- a/README.md +++ b/README.md @@ -12,32 +12,14 @@ Boot into your Arch ISO & run commands: ```bash # Installer 1 -curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/preinstall1.sh -o preinstall1.sh -sh preinstall1.sh +curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install1.sh -o install1.sh +sh install1.sh # Enter Arch root directory arch-chroot /mnt -# Set your root password -passwd - -# Create your user account, replace USERNAME with your desired username -useradd -m -g users -G wheel,storage,power -s /bin/bash USERNAME - -# Set the password for your account, replace USERNAME with the user you created -passwd USERNAME - -# Run this & take note of your network adapter name (ex: ens33) -ip link - -# Installer 2 Setup -sudo pacman -S nano curl --noconfirm --needed -curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/preinstall2.sh -o preinstall2.sh - -# Edit network adapter name for dhcpcd service in script line 43 -nano preinstall2.sh - # Installer 2 +curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install2.sh -o install2.sh sh preinstall2.sh # Preparing for first boot (Non-Nvidia GPU or VM) @@ -57,32 +39,15 @@ reboot ### After First Boot ```bash -sudo pacman -S --noconfirm pacman-contrib git +sudo pacman -S --noconfirm pacman-contrib sudo git clone https://git.merlinslair.net/beech/ArchScripts cd ArchScripts - -# Normal Install -sh setup-gnome.sh # GNOME install -OR -sh setup-kde.sh # KDE install +chmod +x install3.sh +sh install3.sh reboot - -sh software.sh ``` -### After First Boot (VM) - -```bash -sudo pacman -S --noconfirm pacman-contrib git -sudo git clone https://git.merlinslair.net/beech/ArchScripts -cd ArchScripts - -# Installed as VM -sh setup-vmgnome.sh # GNOME install (VM) -OR -sh setup-vmkde.sh # KDE install (VM) - # Audio Fix for VMs mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ cd ~/.config/wireplumber/wireplumber.conf.d @@ -114,7 +79,7 @@ sh software.sh ``` ### System Description -GNOME or KDE Desktop Enviornment +GNOME or KDE Desktop Environment GDM or SDDM Login Manager -- 2.36.2 From 8f4c2578fe3743764fd581fe0d0a37a0660f4718 Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 03:18:04 -0500 Subject: [PATCH 23/28] updated install 3 --- install3-ex.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install3-ex.sh b/install3-ex.sh index 9f5f2ed..5d4856e 100644 --- a/install3-ex.sh +++ b/install3-ex.sh @@ -1,3 +1,9 @@ +#!/usr/bin/env bash +chmod +x gnomesetup.sh +chmod +x kdesetup.sh +chmod +x software.sh +chmod +x aur.sh + install_gnome () { echo "Setting up GNOME + GDM..." sh gnomesetup.sh -- 2.36.2 From f65809c3c101a05ae519d064ebdf72919308cda7 Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 03:21:41 -0500 Subject: [PATCH 24/28] Updated README --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5340ac3..f98c3a7 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,17 @@ reboot ``` # Audio Fix for VMs +```bash mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ + cd ~/.config/wireplumber/wireplumber.conf.d + nano 50-alsa-config.conf +``` + +Add the following lines: -# Add the following lines: +```bash monitor.alsa.rules = [ { matches = [ @@ -71,13 +77,10 @@ monitor.alsa.rules = [ } } ] - -# Reboot Machine -reboot - -sh software.sh ``` +Reboot Machine + ### System Description GNOME or KDE Desktop Environment -- 2.36.2 From 9f91c6e8ab3ac273380a34f409dd27d54db2b73c Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 12:46:28 -0500 Subject: [PATCH 25/28] Combining --- install1-ex.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install1-ex.sh b/install1-ex.sh index cc3b6b1..cc19103 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -81,6 +81,10 @@ echo "-------------------------------------------------" genfstab -U -p /mnt >> /mnt/etc/fstab +# chroot +arch-chroot /mnt +curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/experimental/install2-ex.sh -o install2.sh + echo "-------------------------------------------------" -echo "Finished install script 1. Please run [arch-chroot /mnt], and move on to the 2nd installer." +echo "Finished install script 1. Please run install2.sh" echo "-------------------------------------------------" -- 2.36.2 From a0800e6e6b32ce2357135078f95af5d4246cf34d Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 13:04:21 -0500 Subject: [PATCH 26/28] Cleaning up --- README.md | 37 ------------------------- VM/50-alsa-config.conf | 17 ++++++++++++ setup-vmgnome.sh => VM/setup-vmgnome.sh | 4 ++- setup-vmkde.sh => VM/setup-vmkde.sh | 2 ++ install1-ex.sh | 8 +++--- install2-ex.sh | 3 -- 6 files changed, 26 insertions(+), 45 deletions(-) create mode 100644 VM/50-alsa-config.conf rename setup-vmgnome.sh => VM/setup-vmgnome.sh (93%) rename setup-vmkde.sh => VM/setup-vmkde.sh (94%) diff --git a/README.md b/README.md index f98c3a7..e47414d 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,6 @@ Boot into your Arch ISO & run commands: curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install1.sh -o install1.sh sh install1.sh -# Enter Arch root directory -arch-chroot /mnt - # Installer 2 curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install2.sh -o install2.sh sh preinstall2.sh @@ -42,45 +39,11 @@ reboot sudo pacman -S --noconfirm pacman-contrib sudo git clone https://git.merlinslair.net/beech/ArchScripts cd ArchScripts -chmod +x install3.sh sh install3.sh reboot ``` -# Audio Fix for VMs -```bash -mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ - -cd ~/.config/wireplumber/wireplumber.conf.d - -nano 50-alsa-config.conf -``` - -Add the following lines: - -```bash -monitor.alsa.rules = [ - { - matches = [ - # This matches the value of the 'node.name' property of the node. - { - node.name = "~alsa_output.*" - } - ] - actions = { - # Apply all the desired node specific settings here. - update-props = { - api.alsa.period-size = 1024 - api.alsa.headroom = 8192 - } - } - } -] -``` - -Reboot Machine - ### System Description GNOME or KDE Desktop Environment diff --git a/VM/50-alsa-config.conf b/VM/50-alsa-config.conf new file mode 100644 index 0000000..45355ba --- /dev/null +++ b/VM/50-alsa-config.conf @@ -0,0 +1,17 @@ +monitor.alsa.rules = [ + { + matches = [ + # This matches the value of the 'node.name' property of the node. + { + node.name = "~alsa_output.*" + } + ] + actions = { + # Apply all the desired node specific settings here. + update-props = { + api.alsa.period-size = 1024 + api.alsa.headroom = 8192 + } + } + } +] diff --git a/setup-vmgnome.sh b/VM/setup-vmgnome.sh similarity index 93% rename from setup-vmgnome.sh rename to VM/setup-vmgnome.sh index b5d2e84..c68ba88 100644 --- a/setup-vmgnome.sh +++ b/VM/setup-vmgnome.sh @@ -69,7 +69,9 @@ sudo systemctl enable gdm.service sudo systemctl enable vmtoolsd.service sudo systemctl enable vmware-vmblock-fuse.service cp /usr/share/pipewire/pipewire.conf /etc/pipewire/ +mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ +cp ~/ArchScripts/VM/50-alsa-config.conf ~/.config/wireplumber/wireplumber.conf.d/50-alsa-config.conf echo -echo "Done! Please Reboot & Run software.sh. View wiki for VM audio fix." +echo "Done! Please Reboot." echo diff --git a/setup-vmkde.sh b/VM/setup-vmkde.sh similarity index 94% rename from setup-vmkde.sh rename to VM/setup-vmkde.sh index 41e34ad..2003bd8 100644 --- a/setup-vmkde.sh +++ b/VM/setup-vmkde.sh @@ -69,6 +69,8 @@ sudo systemctl enable sddm.service sudo systemctl enable vmtoolsd.service sudo systemctl enable vmware-vmblock-fuse.service cp /usr/share/pipewire/pipewire.conf /etc/pipewire/ +mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ +cp ~/ArchScripts/VM/50-alsa-config.conf ~/.config/wireplumber/wireplumber.conf.d/50-alsa-config.conf echo echo "Done! Please Reboot & Run software.sh. View wiki for VM audio fix." diff --git a/install1-ex.sh b/install1-ex.sh index cc19103..3061299 100644 --- a/install1-ex.sh +++ b/install1-ex.sh @@ -81,10 +81,10 @@ echo "-------------------------------------------------" genfstab -U -p /mnt >> /mnt/etc/fstab +echo "-------------------------------------------------" +echo "Finished install script 1. Run install2.sh" +echo "-------------------------------------------------" + # chroot arch-chroot /mnt -curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/experimental/install2-ex.sh -o install2.sh -echo "-------------------------------------------------" -echo "Finished install script 1. Please run install2.sh" -echo "-------------------------------------------------" diff --git a/install2-ex.sh b/install2-ex.sh index 327a41f..05ab5d0 100644 --- a/install2-ex.sh +++ b/install2-ex.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -# Create your user account following the README instructions before running this. -# Edit hostname on line 26 if desired - lsblk echo "Specify drive name that you entered in the first script." -- 2.36.2 From 55815c32238aa51abc42a1e5ac4cfabc4cff0281 Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 13:06:20 -0500 Subject: [PATCH 27/28] Updated file names --- install1-ex.sh => install1.sh | 0 install2-ex.sh => install2.sh | 0 install3-ex.sh => install3.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename install1-ex.sh => install1.sh (100%) rename install2-ex.sh => install2.sh (100%) rename install3-ex.sh => install3.sh (100%) diff --git a/install1-ex.sh b/install1.sh similarity index 100% rename from install1-ex.sh rename to install1.sh diff --git a/install2-ex.sh b/install2.sh similarity index 100% rename from install2-ex.sh rename to install2.sh diff --git a/install3-ex.sh b/install3.sh similarity index 100% rename from install3-ex.sh rename to install3.sh -- 2.36.2 From 479ca41a87be1d36e38d0f59181c83de38fa530c Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 14 Sep 2024 13:41:26 -0500 Subject: [PATCH 28/28] Cleanup --- install2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install2.sh b/install2.sh index 05ab5d0..b2a36c5 100644 --- a/install2.sh +++ b/install2.sh @@ -9,9 +9,9 @@ echo "Create a root password (not your user password)." passwd -echo "Create user account" +echo "Create a user account." -read Username +read -r -p "Create username: " Username useradd -m -g users -G wheel,storage,power -s /bin/bash $Username -- 2.36.2