Automated installer for Arch Linux with LUKS2 encryption, BTRFS filesystem, and UEFI support.
Inspired by: easy-arch, Archinstall and SysGuides
- Full Disk Encryption (LUKS2)
- BTRFS with Subvolumes (snapshots, compression)
- UEFI Boot (GRUB with encryption support)
- Performance (zram swap, optimized mount options)
- Snapshot Management (snapper for root and home, grub-btrfs for bootable snapshots, snap-pac for automatic pacman snapshots)
- Boot from Arch Linux live image
- UEFI-capable system
- Internet connection configured (the easiest way is via
iwctlorwifi-menuon the Arch ISO), e.g.:iwctl --passphrase "Passphrase" station wlan0 connect <NetworkName>
- Initial Setup:
# Download and run
curl -O https://raw.githubusercontent.com/debelio/arch-install/refs/heads/main/arch-install.sh
chmod +x arch-install.sh
# Run with sudo (if not already root)
./arch-install.sh- Preparation: Checks permissions, checks internet connection
- User Input: Passwords (LUKS, root, user), hostname, user account, disk selection
- Partitioning: Creates ESP (1GB) + encrypted root partition
- Encryption: LUKS2 with keyfile for passwordless boot (after GRUB unlocks it)
- Filesystem: BTRFS with subvolumes (@, @home, @opt, etc.)
- Installation: Base system + linux kernels (stable & lts) + firmware + grub + btrfs-progs + snapper + snap-pac + zram-generator + networkmanager + vim + sudo
- Configuration: Fstab, Timezone, Locales, Users, Sudoers, Mkinitcpio (systemd hooks), GRUB (cryptodisk enabled)
- Boot Setup: EFIBootMgr entry, GRUB configuration with BTRFS integration
- Finalization: Services enabled (NetworkManager, snapper timers, etc.)
The installation creates separate BTRFS subvolumes for different parts of the filesystem:
/ (@)
/home (@home)
/home/.snapshots (@home/.snapshots) - snapper snapshots for home
/opt (@opt)
/.snapshots (@.snapshots) - snapper snapshots for root
/var/cache (@var/cache)
/var/lib/docker (@var/lib/docker)
/var/lib/libvirt (@var/lib/libvirt)
/var/log (@var/log)
/var/spool (@var/spool)
/tmp (@tmp)
This layout allows:
- Separate snapshots for root and home directories via snapper
- Selective exclusion of cache, logs, and temporary data from snapshots
- Optimized mount options (compression, noatime, SSD support)
- Boot into any snapshot via GRUB menu (grub-btrfs integration)
The script enables NetworkManager by default. After rebooting into the new system, you can use nmcli or nmtui to set up your network connection if it doesn't auto-connect.
The installation script installs snap-pac, a pacman hook that automatically creates Btrfs snapshots before and after package operations using snapper.
How it works:
- Pre-snapshot: Creates a snapshot before package installation/removal
- Package operation: Runs the pacman command
- Post-snapshot: Creates a post-snapshot after successful operations
- Automatic cleanup: Snapper manages snapshot retention based on configured limits
Usage: Simply use pacman as usual. Snapshots are created automatically:
sudo pacman -S neovim
# Output includes snapshot creation messagesManual snapshot management: Use snapper commands to manage snapshots:
# List snapshots
sudo snapper -c root list
# Rollback to a snapshot
sudo snapper -c root rollback <snapshot-number>This project is licensed under the Apache License 2.0 - see the LICENSE file for details.