Have you ever wanted to use an IaC (Infrastructure as Code) approach towards automating an Arch Linux environment? If so, this README should help with getting you get what you need.
There are other Automated Linux installers, and there's nothing wrong with them if your needs are met. However, if you're a ZFS fan most alternatives don't account for ZFS on Root, let alone a mirrored configuration!
On a personal level, I'm finally making efforts to run Linux as my daily driver since I believe we are approaching the time of the Linux Desktop. Most tools I enjoy to use these days are written in Go, and I wanted to become a Gopher myself.
In addition, the release of the Steam Deck has motivated me to ensure I get Arch Linux configured exactly the way I want.
Implementing a project like this was practical for me to easily and consistently repeat multiple OS installs while ensuring I improve my skills in another language.
Download ArchISO from https://archlinux.org/download/ and put on a USB drive with Etcher, Ventoy, or Rufus
If you're looking for ZFS on Root, ensure to use an ISO with ZFS packages pre-installed.
Some archiso wrappers include: https://github.com/ShobuPrime/arch-iso-zfs and https://github.com/stevleibelt/arch-linux-live-cd-iso-with-zfs
Another helpful guide can be found at https://michaelabrahamsen.com/posts/arch-linux-iso-zfs/
If running ShobuArch from official repository, run the following commands on a fresh boot of your ISO:
pacman -Syy git
git clone https://github.com/ShobuPrime/ShobuArch.git
cd ShobuArch/.build
chmod +x ShobuArch
./ShobuArch
ShobuArch runs both with and without arguments. Currently, supported flags are:
-config string
'y': Load config, 'n': Fresh config (default "n")
-format string
Accepted: 'JSON' || 'YAML' (default "json")
-method string
'a': Automated, 'm': Manual (default "m")
Depending on arguments used, ShobuArch prompts the user for information deemed important for a coherent OS install:
- Username
- Password
- Filesystem
- Kernel
- Desktop Environment
- Window Manager
- AUR helper
- etc.
Official Arch Installation Guide
ShobuArch generates a logfile including every command ran, and its STDOUT and STDERR outputs. If something ended up not working the way you want, you should be able to dig through the logs to find what commands started to Go wonky.
- Add some GIFS or screenshots of the tool working in action
- Offline ISO builder
- Verbosity flag, since right now the log is naturally very verbose
- Implement some sort of
resume
mechanism if a specific function failed very poorly, so we can continue from where we left off
- When generating a fresh config through the UI, util-linux v2.38 added new key-value pairs which are being returned incorrectly. A fix was committed.
- You can workaround this issue my manually creating your config and loading it. A temp fix was also implemented via this commit to only return "working" fields.
- Inspiration for the project came from the philosophy of ArchTitus
- Thank you Reddit User /u/BrenekH for helping solve my Go Report Card issues
- Thank you Reddit User /u/AladW for identifying an issue with hostnames
- Thank you Reddit user /u/Max_yask for suggesting significant feature requests such as YAML and sourcing dotfiles