I have been looking to move to using a tiling window manager such as i3. Howver, I found Ubuntu was not the best distro to run i3. I have switched to Arch but whilst I was testing various setup configurations, I got bored of having to run the install steps manually.

At the bottom is the script I use to Automatically install Arch.

Requirements

  • I am running this on a 5th Gen X1 Carbon Thinkpad. As a result, the script is setup for
    • UEFI mode
    • NVMe SSD Storage - Expecting disk partitions to start with nvme0n1

Partition Layout

After running the script the partition layout will be:

Name Type Mountpoint
nvme0n1 disk
├─nvme0n1p1 part /boot
├─nvme0n1p2 part
   └─cryptlvm crypt
       ├─Arch-swap lvm [SWAP]
       └─Arch-root lvm /

Install Steps

  1. Download and boot into the latest Arch Linux iso
  2. Connect to the internet. If using wifi, you can use wifi-menu to connect to a network
    • Check you have an working internet connection. run ping google.com
  3. Clear all existing partitions using gdisk
    1
    2
    3
    4
    5
    
    gdisk /dev/nvme0n1
    x
    z
    y
    y
    
  4. install reflector and set your mirrorlist to the closest and fastet servers
    1
    2
    
    pacman -S reflector
    reflector -c "United Kingdom" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
    
  5. Copy the code at the bottom to arch_install.sh
  6. Change the variables at the top of the file (lines 3 through 9)
    • continent_country must have the following format: Region/City . e.g. Europe/London
  7. Make the script executable: chmod +x 1_arch_install.sh
  8. Run the script: ./arch_install.sh
  9. Reboot into Arch Linux
  10. If connecting with Wifi, connect using nmtui

What to do next.

At this point you have a very minimal Arch setup running. You can only login as root and no gui is available.

At this point, I set up my user and i3 window manager using the LARBS script . This script will setup your user profile and auto install the needed applications and dotfiles. It is well worth checking out.