Merge pull request 'experimental' (#1) from experimental into main

Reviewed-on: #1
main
beech 2 years ago
commit f270f1d839
  1. 81
      README.md
  2. 17
      VM/50-alsa-config.conf
  3. 4
      VM/setup-vmgnome.sh
  4. 2
      VM/setup-vmkde.sh
  5. 1
      gnomesetup.sh
  6. 63
      install1.sh
  7. 37
      install2.sh
  8. 47
      install3.sh
  9. 1
      kdesetup.sh
  10. 27
      nvidia.sh
  11. 81
      preinstall1nvme.sh
  12. 62
      preinstall2.sh

@ -12,32 +12,11 @@ Boot into your Arch ISO & run commands:
```bash ```bash
# Installer 1 # Installer 1
curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/preinstall1.sh -o preinstall1.sh curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install1.sh -o install1.sh
sh preinstall1.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 # Installer 2
curl https://git.merlinslair.net/beech/ArchScripts/raw/branch/main/install2.sh -o install2.sh
sh preinstall2.sh sh preinstall2.sh
# Preparing for first boot (Non-Nvidia GPU or VM) # Preparing for first boot (Non-Nvidia GPU or VM)
@ -57,64 +36,16 @@ reboot
### After First Boot ### After First Boot
```bash ```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
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 sudo git clone https://git.merlinslair.net/beech/ArchScripts
cd ArchScripts cd ArchScripts
sh install3.sh
# 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
nano 50-alsa-config.conf
# Add the following lines:
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
reboot reboot
sh software.sh
``` ```
### System Description ### System Description
GNOME or KDE Desktop Enviornment GNOME or KDE Desktop Environment
GDM or SDDM Login Manager GDM or SDDM Login Manager

@ -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
}
}
}
]

@ -69,7 +69,9 @@ sudo systemctl enable gdm.service
sudo systemctl enable vmtoolsd.service sudo systemctl enable vmtoolsd.service
sudo systemctl enable vmware-vmblock-fuse.service sudo systemctl enable vmware-vmblock-fuse.service
cp /usr/share/pipewire/pipewire.conf /etc/pipewire/ 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
echo "Done! Please Reboot & Run software.sh. View wiki for VM audio fix." echo "Done! Please Reboot."
echo echo

@ -69,6 +69,8 @@ sudo systemctl enable sddm.service
sudo systemctl enable vmtoolsd.service sudo systemctl enable vmtoolsd.service
sudo systemctl enable vmware-vmblock-fuse.service sudo systemctl enable vmware-vmblock-fuse.service
cp /usr/share/pipewire/pipewire.conf /etc/pipewire/ 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
echo "Done! Please Reboot & Run software.sh. View wiki for VM audio fix." echo "Done! Please Reboot & Run software.sh. View wiki for VM audio fix."

@ -57,6 +57,7 @@ for PKG in "${PKGS[@]}"; do
sudo pacman -S "$PKG" --noconfirm --needed sudo pacman -S "$PKG" --noconfirm --needed
done done
sudo systemctl disable sddm.service
sudo systemctl enable gdm.service sudo systemctl enable gdm.service
echo echo

@ -4,52 +4,57 @@
# Change boot, SWAP, and root partition sizes to your needs in lines 15-17 # Change boot, SWAP, and root partition sizes to your needs in lines 15-17
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo "Setting up partitions - DRIVE WILL BE WIPED" echo "Arch Install Script 1 - Drive Setup"
echo "-------------------------------------------------" 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
echo -e "\nFormatting disk...\n$HR"
# disk prep # disk prep
sgdisk -Z /dev/sda # zap all on disk sgdisk -Z $DISK # zap all on disk
sgdisk -a 2048 -o /dev/sda # new gpt disk 2048 alignment sgdisk -a 2048 -o $DISK # new gpt disk 2048 alignment
# create partitions # create partitions
sgdisk -n 1:0:1024M /dev/sda # partition 1 (boot) sgdisk -n 1:0:1024M $DISK # partition 1 (boot)
sgdisk -n 2:0:4G /dev/sda # partition 2 (SWAP - change to desired size) sgdisk -n 2:0:4G $DISK # partition 2 (SWAP - change to desired size)
sgdisk -n 3:0:35G /dev/sda # partition 3 (root - change to desired size) sgdisk -n 3:0:35G $DISK # partition 3 (root - change to desired size)
sgdisk -n 4:0:0 /dev/sda # partition 4 (home, remaining space) sgdisk -n 4:0:0 $DISK # partition 4 (home, remaining space)
# set partition types # set partition types
sgdisk -t 1:ef00 /dev/sda sgdisk -t 1:ef00 $DISK
sgdisk -t 2:8200 /dev/sda sgdisk -t 2:8200 $DISK
sgdisk -t 3:8300 /dev/sda sgdisk -t 3:8300 $DISK
sgdisk -t 4:8300 /dev/sda sgdisk -t 4:8300 $DISK
# label partitions # label partitions
sgdisk -c 1:"boot" /dev/sda sgdisk -c 1:"boot" $DISK
sgdisk -c 2:"swap" /dev/sda sgdisk -c 2:"swap" $DISK
sgdisk -c 3:"root" /dev/sda sgdisk -c 3:"root" $DISK
sgdisk -c 4:"home" /dev/sda sgdisk -c 4:"home" $DISK
# make filesystems # make filesystems
echo "-------------------------------------------------" echo -e "\nCreating Filesystems...\n$HR"
echo "Creating Filesystems"
echo "-------------------------------------------------"
mkfs.fat -F32 /dev/sda1 # FAT32 boot partition mkfs.fat -F32 ${DISK}1 # FAT32 boot partition
mkswap /dev/sda2 # create SWAP mkswap ${DISK}2 # create SWAP
swapon /dev/sda2 # enable SWAP swapon ${DISK}2 # enable SWAP
mkfs.ext4 /dev/sda3 mkfs.ext4 ${DISK}3
mkfs.ext4 /dev/sda4 mkfs.ext4 ${DISK}4
# mount partitions # mount partitions
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo "Mounting Partitions" echo "Mounting Partitions"
echo "-------------------------------------------------" echo "-------------------------------------------------"
mount /dev/sda3 /mnt mount ${DISK}3 /mnt
mkdir /mnt/boot mkdir /mnt/boot
mkdir /mnt/home mkdir /mnt/home
mount /dev/sda1 /mnt/boot mount ${DISK}1 /mnt/boot
mount /dev/sda4 /mnt/home mount ${DISK}4 /mnt/home
# set download mirrors # set download mirrors
echo "-------------------------------------------------" echo "-------------------------------------------------"
@ -77,5 +82,9 @@ echo "-------------------------------------------------"
genfstab -U -p /mnt >> /mnt/etc/fstab genfstab -U -p /mnt >> /mnt/etc/fstab
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo "Finished install script 1. Please run [arch-chroot /mnt], create your user and move on to the 2nd installer." echo "Finished install script 1. Run install2.sh"
echo "-------------------------------------------------" echo "-------------------------------------------------"
# chroot
arch-chroot /mnt

@ -1,7 +1,23 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Create your user account following the README instructions before running this. lsblk
# Edit hostname on line 26 if desired echo "Specify drive name that you entered in the first script."
read -r -p "Enter the disk: " DISK
echo "Create a root password (not your user password)."
passwd
echo "Create a user account."
read -r -p "Create username: " 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 # File edits for user permissions
@ -23,7 +39,11 @@ hwclock --systohc --utc
# set hostname - edit archdesk with preferred hostname # 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 # Enable TRIM
@ -43,19 +63,14 @@ echo "title Arch" > /boot/loader/entries/arch.conf
echo "linux /vmlinuz-linux" >> /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 "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 echo "options root=PARTUUID=$(blkid -s PARTUUID -o value ${DISK}3) 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 # install NetworkManager
sudo pacman -S networkmanager --noconfirm --needed sudo pacman -S networkmanager --noconfirm --needed
sudo pacman -S git --noconfirm --needed
sudo systemctl enable NetworkManager.service sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot" echo "Arch Linux Installed & Configured. Please [exit] & run [umount -R /mnt] and reboot"

@ -0,0 +1,47 @@
#!/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
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."
}
setup_aur () {
echo "Setting up Yay..."
sh aur.sh
echo "Yay installed."
}
while true; do
options=("Install GNOME + GDM" "Install KDE + SDDM" "Install Software" "Setup Yay" "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) setup_aur; break ;;
5) break 2 ;;
*) echo "Invalid" >&2
esac
done
done
echo "Exiting! Please reboot to enter desktop environment."

@ -57,6 +57,7 @@ for PKG in "${PKGS[@]}"; do
sudo pacman -S "$PKG" --noconfirm --needed sudo pacman -S "$PKG" --noconfirm --needed
done done
sudo systemctl disable gdm.service
sudo systemctl enable sddm.service sudo systemctl enable sddm.service
echo echo

@ -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 "-------------------------------------------------"

@ -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 "-------------------------------------------------"

@ -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 "-------------------------------------------------"