A modular and customizable set of shell scripts to automate the installation of Arch Linux. This project allows you to define your desired system configuration in a template and then "compile" it into a single, standalone shell script that can be easily run from the Arch Linux installation media.
- Modular Architecture: Installation steps are broken down into small, reusable modules (e.g., disk partitioning, kernel installation, desktop environment setup).
- Customizable: Easily choose between different kernels (stable, lts, zen), bootloaders (grub, efistub), and desktop environments (KDE, GNOME) by simply commenting or uncommenting lines.
- Standalone Script Generation: A Python helper script combines your selected modules into one portable script, resolving dependencies and file inclusions.
- Pre-configured Defaults: Includes sensible defaults for partitioning, package selection, and system settings.
- To generate the script: A machine with Python 3 installed.
- To run the installer: An Arch Linux Live ISO environment.
First, clone this repository:
git clone https://github.com/bouligo/archinstall.git
cd archinstallCopy the template.sh to a new file. This will be your configuration file.
cp template.sh my-install.shEdit my-install.sh with your preferred text editor. Review the file and uncomment the modules you want to use, or comment out the ones you don't need.
Example configuration choices:
- Disk:
simple.sh(standard partitions),lvm.sh, orlvm-on-luks.sh. - Kernel:
kernel.sh(stable),kernel-lts.sh, etc. - Desktop:
kde.sh,gnome.sh, or minimal versions.
Note: If you cloned this repository from the archiso, you can skip step 2.
Run the Python builder script to merge your configuration and the modules into a single file:
python3 create_standalone_script.py my-install.shThis will create a file named my-install-static.sh.
Boot your target machine with the Arch Linux Live ISO and transfer the generated my-install-static.sh to the live environment (e.g., via SCP, USB drive, or downloading it).
Run the script with the required arguments:
# Usage: bash script.sh <target_disk> <hostname> <username>
bash my-install-static.sh sda MyArchMachine myusertarget_disk: The block device to install to (e.g.,sda,nvme0n1). WARNING: This disk will be formatted.hostname: The desired hostname for the computer.username: The name of the non-root user to create.
WARNING: These scripts involve disk partitioning and formatting. All data on the specified target disk will be destroyed. Always verify the target disk identifier (sda, nvme0n1, etc.) before running the script. Use at your own risk.