parent
68cb3d5c11
commit
9bae28bd6e
@ -1,3 +1,57 @@ |
||||
# ArchScripts |
||||
# ArchMatic Installer Script - VMWare |
||||
|
||||
Scripts for full Arch Install |
||||
My modified ArchMatic scripts for a full Arch install & configuration with DE, support packages, and apps. Forked for VMWare optimization. |
||||
|
||||
--- |
||||
|
||||
## Setup Boot and Arch ISO on USB key |
||||
|
||||
First, setup the boot USB, boot arch live iso, and run the `preinstall.sh` from terminal. |
||||
|
||||
### Arch Live ISO (Pre-Install) |
||||
|
||||
This step installs arch to your hard drive. *IT WILL FORMAT THE DISK* |
||||
|
||||
```bash |
||||
curl https://git.boppdev.net/beech/ArchScripts/raw/branch/main/preinstall1.sh -o preinstall1.sh |
||||
sh preinstall1.sh |
||||
|
||||
passwd |
||||
useradd -M -g users -G wheel,storage,power -S /bin/bash USERNAME |
||||
passwd USERNAME |
||||
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers |
||||
echo "Defaults rootpw" >> /etc/sudoers |
||||
|
||||
ip link # Take note of your link name & edit in preinstall2. |
||||
|
||||
# Run preinstall2.sh |
||||
|
||||
curl https://git.boppdev.net/beech/ArchScripts/raw/branch/main/preinstall2.sh -o preinstall2.sh |
||||
nano preinstall2.sh |
||||
# Edit adapter name for dhcpcd service in script |
||||
sh preinstall2.sh |
||||
``` |
||||
|
||||
### After First Boot |
||||
|
||||
```bash |
||||
pacman -S --noconfirm pacman-contrib curl git |
||||
git clone https://git.boppdev.net/beech/ArchScripts |
||||
cd ArchScripts |
||||
sh setup.sh |
||||
sh software.sh |
||||
``` |
||||
|
||||
### System Description |
||||
GNOME Desktop Enviornment |
||||
GDM Login Manager |
||||
|
||||
Booting using `systemd` |
||||
|
||||
Installs the LTS Kernel along side the rolling one, and configures the bootloader to offer both as a choice during startup. This allows you to switch kernels in the event of a problem with the rolling one. |
||||
|
||||
### Credits |
||||
|
||||
__[Credits to johnynfulleffect's fork of ArchMatic](https://github.com/johnynfulleffect/ArchMatic)__ |
||||
|
||||
__[Credits to rickellis - ArchMatic](https://github.com/ChrisTitusTech/ArchMatic)__ |
||||
@ -0,0 +1,93 @@ |
||||
#!/usr/bin/env bash |
||||
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) |
||||
sgdisk -n 3:0:35G /dev/sda # partition 3 (root) |
||||
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 |
||||
|
||||
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup # backs up mirrorlist |
||||
sudo pacman -Sy pacman-contrib |
||||
rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist |
||||
|
||||
# install arch |
||||
|
||||
pacstrap -K /mnt base linux linux-firmware base-devel |
||||
|
||||
echo "-------------------------------------------------" |
||||
echo "Arch Installed - Generating fstab and entering chroot" |
||||
echo "-------------------------------------------------" |
||||
|
||||
# generate fstab |
||||
|
||||
genfstab -U -p /mnt >> /mnt/etc/fstab |
||||
|
||||
arch chroot /mnt # chroot |
||||
|
||||
# generate locales |
||||
|
||||
sudo pacman -S nano bash-completion |
||||
sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen |
||||
locale-gen |
||||
echo LANG=en_US.UTF-8 > /etc/locale.conf |
||||
export LANG=en_US.UTF-8 |
||||
|
||||
# set timezone & link HW clock |
||||
|
||||
ln -S /usr/share/zoneinfo/America/Chicago > /etc/localtime |
||||
hwclock --systohc --utc |
||||
|
||||
# set hostname |
||||
|
||||
echo archdesk > /etc/hostname |
||||
|
||||
# Enable TRIM |
||||
|
||||
systemctl enable fstrim.timer |
||||
|
||||
echo "-------------------------------------------------" |
||||
echo "Create user accounts using commands in README, then proceed to 2nd installer." |
||||
echo "-------------------------------------------------" |
||||
@ -0,0 +1,35 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# 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 |
||||
sudo systemctl enable dhcpcd@ADAPTER.service # EDIT "ADAPTER" WITH YOUR ADAPTER IN IP LINK |
||||
|
||||
# install NetworkManager |
||||
|
||||
sudo pacman -S networkmanager |
||||
sudo systemctl enable NetworkManager.service |
||||
|
||||
|
||||
echo "-------------------------------------------------" |
||||
echo "Arch Linux Installed & Configured - Reboot & Proceed to setup scripts" |
||||
echo "-------------------------------------------------" |
||||
|
||||
exit |
||||
umount -R /mnt |
||||
@ -0,0 +1,67 @@ |
||||
#!/usr/bin/env bash |
||||
echo |
||||
echo "Installing Base System" |
||||
echo |
||||
|
||||
PKGS=( |
||||
|
||||
# --- VM Packages |
||||
'open-vm-tools' |
||||
|
||||
# --- XORG Display Rendering |
||||
'xorg' # Base Package |
||||
'xorg-drivers' # Display Drivers |
||||
'xterm' # Terminal for TTY |
||||
'xorg-server' # XOrg server |
||||
'xorg-apps' # XOrg apps group |
||||
'xorg-xinit' # XOrg init |
||||
'xorg-xinput' # XOrg xinput |
||||
'xorg-twm' # XOrg twm |
||||
'xorg-xclock' # XOrg xclock |
||||
'xf86-input-vmmouse' |
||||
'xf86-video-vmware' |
||||
'mesa' |
||||
|
||||
# --- Setup Desktop |
||||
'gnome' # GNOME |
||||
'xfce4-power-manager' # Power Manager |
||||
|
||||
# --- Login Display Manager |
||||
'gdm' # Base Login Manager |
||||
|
||||
# --- Networking Setup |
||||
'dialog' # Enables shell scripts to trigger dialog boxex |
||||
'networkmanager' # Network connection manager |
||||
'network-manager-applet' # System tray icon/utility for network connectivity |
||||
'dhclient' # DHCP client |
||||
'libsecret' # Library for storing passwords |
||||
'fail2ban' # Ban IP's after man failed login attempts |
||||
'ufw' # Uncomplicated firewall |
||||
|
||||
# --- Audio |
||||
'alsa-utils' # Advanced Linux Sound Architecture (ALSA) Components https://alsa.opensrc.org/ |
||||
'alsa-plugins' # ALSA plugins |
||||
'pulseaudio' # Pulse Audio sound components |
||||
'pulseaudio-alsa' # ALSA configuration for pulse audio |
||||
'pavucontrol' # Pulse Audio volume control |
||||
'pnmixer' # System tray volume control |
||||
|
||||
# --- Bluetooth |
||||
'bluez' # Daemons for the bluetooth protocol stack |
||||
'bluez-utils' # Bluetooth development and debugging utilities |
||||
'bluez-libs' # Bluetooth libraries |
||||
'bluez-firmware' # Firmware for Broadcom BCM203x and STLC2300 Bluetooth chips |
||||
'blueberry' # Bluetooth configuration tool |
||||
'pulseaudio-bluetooth' # Bluetooth support for PulseAudio |
||||
) |
||||
|
||||
for PKG in "${PKGS[@]}"; do |
||||
echo "INSTALLING: ${PKG}" |
||||
sudo pacman -S "$PKG" --noconfirm --needed |
||||
done |
||||
|
||||
sudo systemctl enable gdm.service |
||||
|
||||
echo |
||||
echo "Done! Please Reboot & Run software.sh" |
||||
echo |
||||
@ -0,0 +1,56 @@ |
||||
#!/usr/bin/env bash |
||||
echo |
||||
echo "INSTALLING SOFTWARE" |
||||
echo |
||||
|
||||
PKGS=( |
||||
|
||||
# TERMINAL UTILITIES -------------------------------------------------- |
||||
|
||||
'curl' # Remote content retrieval |
||||
'file-roller' # Archive utility |
||||
'gufw' # Firewall manager |
||||
'hardinfo' # Hardware info app |
||||
'neofetch' # Shows system info when you launch terminal |
||||
'numlockx' # Turns on numlock in X11 |
||||
'p7zip' # 7z compression program |
||||
'unrar' # RAR compression program |
||||
'unzip' # Zip compression program |
||||
'wget' # Remote content retrieval |
||||
'konsole' # Terminal emulator |
||||
'vim' # Terminal Editor |
||||
'zenity' # Display graphical dialog boxes via shell scripts |
||||
'zip' # Zip compression program |
||||
'zsh' # Interactive shell |
||||
'zsh-autosuggestions' # Zsh Plugin |
||||
'zsh-syntax-highlighting' # Zsh Plugin |
||||
'nano' # Simpler Terminal Editor |
||||
|
||||
# GENERAL UTILITIES --------------------------------------------------- |
||||
|
||||
'dolphin' # Filesystem browser |
||||
|
||||
# DEVELOPMENT --------------------------------------------------------- |
||||
|
||||
'gedit' # Text editor |
||||
'code' # Visual Studio Code |
||||
'git' # Version control system |
||||
'nodejs' # Javascript runtime environment |
||||
'npm' # Node package manager |
||||
'python' # Scripting language |
||||
'yarn' # Dependency management (Hyper needs this) |
||||
|
||||
# PRODUCTIVITY -------------------------------------------------------- |
||||
|
||||
'xpdf' # PDF viewer |
||||
|
||||
) |
||||
|
||||
for PKG in "${PKGS[@]}"; do |
||||
echo "INSTALLING: ${PKG}" |
||||
sudo pacman -S "$PKG" --noconfirm --needed |
||||
done |
||||
|
||||
echo |
||||
echo "Done!" |
||||
echo |
||||
Reference in new issue