Given the decision was made to not support a GUI installer for a long time, Arch Linux has required expert installation knowledge in recent times. This is a collection of scripts based off the official installation guide that help with automating the install of Arch Linux for my particular needs, which are:
- Using a modern and simple desktop environment
- Developing in C#
- Using general image, video, document, and messaging productivity tools
- Using programs that support a security orientation
- Using a discrete NVIDIA GPU to have
- Excellent gaming performance to replace a console
- Excellent video encoding performance to back up optical media
- Using an ASUS motherboard
- Using two identical HDDs in a LUKS-encrypted ZFS mirror mounted at /srv
The file and folder structure of the repository is a template of sorts that others may be able to reuse for their needs. Start with modifying common.sh and then modify other files from there.
- A wired internet connection is available and used for the entire process
- Two identical HDDs are installed for ZFS mirror storage — identify them with
lsblkorls -l /dev/disk/by-id/
- Back up files
- Prepare USB automation drive and UEFI firmware
- Prepare USB installer drive
- Reboot
- Update UEFI firmware
- Installation
- Post installation
Two separate USB drives are needed to support the installation process.
Run the following commands on one USB drive.
sudo sgdisk -Z /dev/sdX
sudo sgdisk -n 1:1M:+4G -t 1:8302 -c 1:files /dev/sdX
mkfs.fat -F32 /dev/sdXN
cp -rf arch-linux-setup-scripts <mounted /dev/sdXN>
cp -f *.CAP <mounted /dev/sdXN>
Download the Arch Linux installer ISO image and then use the following commands on the other USB drive.
sudo sgdisk -Z /dev/sdY
sudo dd if=archlinux-2016.10.01-dual.iso of=/dev/sdY bs=1M
Within the ASUS UEFI menus, browse to the USB automation drive with the new firmware file to perform the update. This may only be done from a FAT32 filesystem.
Boot into the live environment with the two USB drives plugged in and then use the following commands to create a bootable system.
cd ~
mkdir files
mount /dev/sdX files
cd files/boot
./install.sh <block device>
cd ~
umount files
arch-chroot /mnt
mount /dev/sdX /mnt
cd /mnt/boot
./bootstrap.sh
exit
reboot
Log in as root. Use the following commands to minimally configure the system and add a GUI desktop.
mount /dev/sdX /mnt
cd /mnt/chroot
./install.sh
reboot
Optionally, set up the LUKS-encrypted ZFS mirror for /srv. This can be done at any time, not just during initial setup. Use the same passphrase as the boot drive so that systemd's sd-encrypt hook can unlock all LUKS volumes with a single prompt at boot.
cd /mnt/chroot
./storage.sh /dev/sdA /dev/sdB
reboot
Upon logging into the desktop, execute the desired scripts from the user folder.
The ZFS mirror pool is mounted at /srv and will auto-unlock and auto-mount on every subsequent boot (only one passphrase prompt).
Verify boot order. Have external devices first with the Arch Linux entry just above the HDD entry.