Automated Arch Linux (Written in Go)

ShobuArch -- Automated Arch Linux Tools (Written in Go)

Lint Status Build Status Go Report Card License

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 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

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/

Boot Arch ISO

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")

System Description

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.

Troubleshooting

Official Arch Installation Guide

Install Ach Linux on ZFS

Arch Linux Installed on ZFS

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.

To-Do

  • Add some GIFS or screenshots of the tool working in action

Planned Features

  • 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

Known Issues

  • 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.

Credits

Similar Resources

Sysctl.conf and other system tunings for Linux

PATCHFILES I came to the idea to create patchfiles, when I saw lots of config files people create. Patchfiles implements various config scripts into o

Sep 4, 2022

Linux Gestures

 Linux Gestures

Swipe Gestures on Linux. https://evuraan.info/Swipe/ Screengrab: https://evuraan.info/evuraan/stuff/Swipe.mp4 Features Swipe uses a novel yet simple c

Nov 27, 2022

A Rancher and Kubernetes optimized immutable Linux distribution based on openSUSE

RancherOS v2 WORK IN PROGRESS RancherOS v2 is an immutable Linux distribution built to run Rancher and it's corresponding Kubernetes distributions RKE

Nov 14, 2022

Truly Minimal Linux Distribution for Containers

Statesman Statesman is a minimal Linux distribution, running from memory, that has just enough functionality to run OCI-compatible containers. Rationa

Nov 12, 2021

🔥 🔥 Open source cloud native security observability platform. Linux, K8s, AWS Fargate and more. 🔥 🔥

🔥 🔥   Open source cloud native security observability platform. Linux, K8s, AWS Fargate and more. 🔥 🔥

CVE-2021-44228 Log4J Vulnerability can be detected at runtime and attack paths can be visualized by ThreatMapper. Live demo of Log4J Vulnerability her

Jan 1, 2023

Linux provisioning scripts + application deployment tools. Suitable for self-hosting and hobby-scale application deployments.

Apollo Linux provisioning scripts + application deployment tools. Suitable for self-hosting and hobby-scale application deployments. Philosophy Linux-

Feb 7, 2022

RancherOS v2 is an immutable Linux distribution built to run Rancher and it's corresponding Kubernetes distributions RKE2 and k3s

RancherOS v2 is an immutable Linux distribution built to run Rancher and it's corresponding Kubernetes distributions RKE2 and k3s. It is built using the cOS-toolkit and based on openSUSE

Dec 27, 2022

Lagoon - Simple Linux package repository mirror

Lagoon - Simple Linux package repository mirror A lagoon is a shallow stretch of water separated from the sea by a reef or sandbank. Lagoon can be use

Aug 17, 2022

Isle - A Linux Runtime For Mac

Isle Thanks for your interest in isle, Integrated System Linux Environment. Isle is currently in alpha, but working relatively stably! This page will

Dec 29, 2022
Automated configuration documentation library for Go Projects.

Cato Cato is an automated documentation generation library for Go Projects. Through the use of custom tags for struct fields, Cato can extract informa

Aug 28, 2020
Gola is a Golang tool for automated scripting purpose

Gola Gola is a Golang tool for automated scripting purpose. How To Install You can find the install script here. Example Configuration commands: - n

Aug 12, 2022
Raspberry Pi Archlinux Automated Offline Installer with Wi-Fi. Windows, Mac and more features coming.
Raspberry Pi Archlinux Automated Offline Installer with Wi-Fi. Windows, Mac and more features coming.

Raspberry Pi Archlinux Automated Installer with Wi-Fi. Windows, Mac and more features coming. Download Go to releases page and download the zip file f

Nov 22, 2022
Mutagen Compose is a modified version of Docker Compose that offers automated integration with Mutagen.

Mutagen Compose Mutagen Compose is a (minimally) modified version of Docker Compose that offers automated integration with Mutagen. This allows you to

Dec 22, 2022
A Golang library for testing infrastructure in automated ways.

Infratest Infratest is a Golang library that we hope makes testing your infrastructure using tests that are written in Golang easier to do. The genera

Nov 2, 2022
Automated-gke-cilium-networkpolicy-demo - Quickly provision and tear down a GKE cluster with Cilium enabled for working with Network Policy.

Automated GKE Network Policy Demo Before running the automation, make sure you have the correct variables in env-automation/group_vars/all.yaml. There

Jan 1, 2022
Rustpm - Process manager and automated updates for RustDedicated
Rustpm - Process manager and automated updates for RustDedicated

rustpm (WIP) Process manager for RustDedicated A drop in replacement for RustDed

Feb 15, 2022
Automated refactoring for Terraform

tfrefactor Automated refactoring for Terraform. Currently supports: Rename local / var / data / resource across all files in a config Move items or ca

Oct 21, 2022
Linux Controllers for Kubernetes

Tambourine Kubelet replacement with Built in Linux extensions Development Success: Install, Manage, and Observe a new systemd service from Kubernetes.

Jun 2, 2021
A Go library for the Linux Landlock sandboxing feature

Go landlock library The Go landlock library provides an interface to Linux 5.13's Landlock kernel sandboxing features. The library provides access to

Dec 27, 2022