TechHeart’s 2023 Vanilla Arch Linux (w/ Sauce!) Install Guide
What’s included after installation?
Howdy, TechHearters! We’ll show you how to install Arch Linux step-by-step in this guide!
But, what’s included?? At the end of the installation you’ll have a Vanilla Arch Linux machine ready to add a Desktop Environment, or any other software, to. It’s root partition will be LUKS encrypted. It will use GRUB to unlock, and boot into, that partition. We’ll use a swap file to add 16GB (or your desired swap size) of SWAP memory.
Also, we’ll install some TechHeart Sauce:
Hacker dedsec GRUB2 theming; Makes GRUB look awesome and graphical. You can choose from a dozen hacker styled themes!
An Optimus Prime Plymouth theme; Makes the LUKS encryption unlocking graphical instead of text-based!
OPTIONAL: A TUI Window Manager, Ly. If you’re going to install a Desktop Environment like GNOME, Plasma or Cinnanom you might not want this - but it’s a great retro-styled Window Manager (Login Manager).
Let’s gOOO!!!
Prerequisites
You’ll need an Arch Linux .iso burned to a USB stick, and know how to boot to it on your computer. I use BalenaEtcher to burn the .iso and if you’re on a Windows platform an application named Rufus can help. Then you’ll just have to select to boot to your USB device in BIOS, or select a temporary boot device through BIOS - on a ThinkPad, the user just presses [ENTER] when the Lenovo logo appears, presses F12 to choose a temporary boot device and can then select the USB stick to boot from!
The Arch Linux Installation Medium will boot up, and we’ll then install Arch - and all our sauce - with the following command line commands!
Note, commands in [BRACKETS] may be different for your location, hardware setup, etc.
Installation Commands
- Set system locale / keyboard settings
localectl list-keymaps | grep [us]
loadkeys [us]
- Check for internet connection; connect to Wi-Fi if not present
ip a
(if no ethernet connection:)
iwctl --passphrase [WIFI PW] station [DEVICE; wlan0] connect [SSID]
- Set fast mirrors on installation medium
pacman -Sy reflector
reflector -c [US] -a 12 --sort rate --save /etc/pacman.d/mirrorlist
pacman -Syy
- Get drive info and partition drive
We will create a new partition label, add a 200MB EFI boot partition and use the remaining disk space for a root partition
lsblk
gdisk /dev/[xxx]
n, 1, [ENTER], +200M, L, efi, ef00, n, [ENTER], [ENTER], [ENTER], [ENTER], w, y
- Create, and unlock, LUKS encrypted root partition
lsblk
cryptsetup -y -v [luksFormat] /dev/[xxx]
YES
[PW]
[PW]
cryptsetup open /dev/[xxx] [luksroot]
[PW]
- Format boot and root partitions
mkfs.ext4 /dev/mapper/[luksroot]
mkfs.fat -F32 /dev/[xxx]
lsblk
- Mount partitions for Arch installation
mount /dev/mapper/[luksroot] /mnt
mkdir /mnt/boot
mount /dev/xxx /mnt/boot
lsblk
- Pacstrap; install needed packages prior to chroot
pacstrap /mnt base linux linux-firmware vim [amd]/[intel]-ucode
- Generate fstab
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
- Chroot into Arch
arch-chroot /mnt
- Create, mount and add swap file to fstab
fallocate -l 8GB /[swap_file]
chmod 600 /swap_file]
mkswap /[swap_file]
swapon /[swap_file]
vim /etc/fstab
- add line (Using TABs):
/[swap_file] none swap defaults 0 0
- Locale and time settings
ln -sf /usr/share/zoneinfo/[America]/[Los_Angeles] /etc/localtime
hwclock --systohc
vim /etc/locale.gen
- unhash en_US line
locale-gen
echo LANG=[en_US.UTF8] >> /etc/locale.conf
echo KEYMAP=[us] >> /etc/vconsole.conf
echo [arch] >> /etc/hostname
vim /etc/hosts
- add lines (using TABs):
127.0.0.1 localhost
::1 localhost
127.0.0.1 [arch].localdomain [arch]
- Set root password
passwd [ROOT PW]
- Install system packages
pacman -S base-devel bluez bluez-utils cups dialog dosfstools efibootmgr git grub linux-headers mtools network-manager-applet networkmanager os-prober pulseaudio-bluetooth reflector wireless_tools wpa_supplicant xdg-user-dirs xdg-utils
- Add LUKS encryption unlock
vim /etc/mkinitcpio.conf
- add HOOK;
(After 'autodetect') keyboard keymap (After 'block') encrypt
mkinitcpio -p linux
- Install GRUB, create GRUB config
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
- Add LUKS encrypted partition’s UUID to cryptdevice line in grub config and rebuild grub config
blkid
(Find, and note, crypto_LUKS UUID (Not PARTUUID)...)
vim /etc/default/grub
- add to GRUB_CMDLINE_LINUX between ""s:
cryptdevice=UUID=[UUID]:[luksroot] root=/dev/mapper/[luksroot]
grub-mkconfig -o /boot/grub/grub.cfg
- Systemctl setup
systemctl enable NetworkManager
systemctl enable bluetooth
- Add sudo user
useradd -mG wheel [USERNAME]
passwd [USERNAME]
EDITOR=vim
visudo
- unhash %wheel ALL=(ALL) ALL line
- Reboot VANILLA Linux install!!
exit
reboot now
-
Login to user account after first boot
-
Check for internet connection; connect to Wi-Fi if not present
ip a
(If no Ethernet connection:)
nmtui
- activate wifi
- Install paru / yay
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
cd ..
rm -rf paru
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
- Install graphics drivers
sudo pacman -S [xf86-video-intel]/[xf86-video-amdgpu]/[nvidia nvidia-utils nvidia-settings]
([Arch Wiki - NVIDIA](https://wiki.archlinux.org/title/NVIDIA) if you have older NVIDIA GPU...)
- Install dedsec GRUB theming; choose a theme from dedsec Gitlab Site
git clone --depth 1 https://gitlab.com/VandalByte/dedsec-grub-theme.git
cd dedsec-grub-theme
sudo python3 dedsec-theme.py --install
cd ..
rm -rf dedsec-grub-theme
- Install Plymouth-git and Optimus Prime theme
paru -S plymouth-theme-optimus-git
paru -S plymouth-git
sudo vim /etc/mkinitcpio.conf
- add to HOOKS line, before encrypt;
plymouth
sudo vim /etc/default/grub
- add to GRUB_CMDLINE_LINUX_DEFAULT;
quiet splash
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo plymouth-set-default-theme -R optimus
- OPTIONAL: Install Ly TUI Display Manager (Login Manager)
sudo pacman -S ly
sudo systemctl enable ly.service
sudo systemctl disable getty@tty2.service
sudo vim /etc/ly/config.ini
- make edits for animation, big clock, etc..
sudo vim /usr/lib/systemd/system/ly.service
- ExecStartPre=/usr/bin/sleep .5
- Reboot, and enj0y the sauce!
sudo shutdown now
PR0FIT$