ShobuArch — Automated Arch Linux Tools (Written in Go)
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.
Why does this exist?
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 to 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.
Create Arch ISO or Use Image
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/
- Provide offline ISO builder to ShobuArch.
Boot Arch ISO
If running ShobuArch from official repository, run the following commands on a fresh boot of your ISO:
pacman -Sy git
git clone https://github.com/ShobuPrime/ShobuArch.git
chmod +x ShobuArch
ShobuArch runs both with and without arguments. Currently, supported flags are:
method_flag := flag.String("method", "m", `'a': Automated, 'm': Manual`)
config_flag := flag.String("config", "n", `'y': Load config, 'n': Fresh config`)
Depending on arguments used, ShobuArch prompts the user for information deemed important for a coherent OS install:
- Desktop Environment
- Window Manager
- AUR helper
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
resumemechanism 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, but you will either need to compile util-linux yourself with the changes, or stick to
- Go Report Card badge is failing:
There was an error processing your request: Could not analyze the repository: could not download repo: could not get latest module version from https://proxy.golang.org/shobuarch/@latest: bad request: invalid escaped module path "shobuarch": malformed module path "shobuarch": missing dot in first path element
- 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