In order to avoid manually reinstalling Arch Linux every year I have automated its installation using a makefile. No more manual configuration of LVM, LUKS, UEFI, Grub, Nvidia, Alsa, Xorg, i3, vim, tmux, mutt, gtk etc …
WARNING ! The commands make
described in this article were created only for my personal use, they will be updated later for more general use. I advise you to read the makefile if you want to use them.
Installation steps
In general, the installation of Arch Linux includes many steps:
- Creating, formatting and encrypting partitions
- Installation of archlinux base files
- File configuration
/etc/fstab
- Keyboard configuration (
/etc/vconsole.conf
) - Hostname configuration
- Time zone configuration (
/etc/localtime
) - Time setting
- Language setup
- Configuring the grub bootloader
- Configuring the root password
- Configuring multilib repository
- Sudo configuration
- Service configuration
- Installation of a manager package for AUR (Arch User Repository)
- Installing the Xorg graphics server
- Installation of graphics drivers (Nvidia, Intel)
- Installation of audio drivers (alsa, pulseaudio)
- Installation of a network manager (NetworkManager)
- Installing a lightweight window manager (i3)
- Installation of my packages
I created a makefile which contains all the shell commands to be executed during installation. From now on, if I want to do a full installation, I only have 2 commands to enter, one for creating partitions and the other for installing Arch Linux.
make create-new-partitions
make install-new-arch
Copy
In case my system crashes or I just want to reinstall Arch Linux, make install-new-arch
just the command is enough. The partitions root
, boot
and efi
will be reset and the partition home
will remain intact.
Dotfiles
All the configurations of my applications (vim, tmux, mutt, i3, gtk etc ..) my keyboard shortcuts, my aliases, my theme (fonts, wallpaper, icons, colors, etc …) are personalized and versioned. A simple command allows you to install everything:
make install-dotfiles
Copy
Conclusion
- Create a bootable Arch Linux USB stick with etcher
- Boot your computer on the bootable key
- Connect the computer to the internet with the command
wifi-menu
- Install the git and make packages with the command
pacman -S git make
- Clone the repository with the command
git clone https://github.com/ston3o/dotfiles
- Execute commands
make create-new-partitions
andmake install-new-arch