Arch Linux Installation Script

Overview

This script is meant to provide a starting point for users who have used some linux distros before like ubuntu, but never got around to using distros like arch which requires you to configure things on your own.

It can also be used to quickly setup an OS install.

Pre-requisites

  1. Creating a arch install boot loader.

image_showing_arch_loader

  1. Freeing up space

The minimum space required for the following types of installs is given below (feel free to free up more than that if you see fit):

  • Minimal (no desktop environment): 11 GB
  • GNOME or KDE Desktop Environment: 41 GB
  • XFCE Desktop Enviornment: 31 GB

Also do note that this does not include the swap partition size required (which is recommended to be the same size as your actual ram).

(swap space is optional but beneficial, enhancing system performance by providing additional virtual memory when RAM is full)

So if you have 8GB ram free up 41GB (for xfce/kde/wayland) + 8GB (for swap) = 49GB (or more)

Installation

  1. First download the repo as zip (cloning using "git clone" on windows or any other dos system wont work since it changes encoding)

image_showing_arch_loader

  1. Move the folder of the repo to your pendrive (which you have flashed arch installer iso on)

How to run

  1. Boot into the pendrive (where arch installer is loaded into)

image_showing_arch_loader

  1. List storage devices and identify the pendrive

image_showing_arch_loader

lsblk

(in this case since my pendrive is 32 GBs, i can assume that the seperate sda partition of 28.7 GBs is it)

(remember that the pendrive will be in a seperate group/tree from the other partitions and will be only 1 partition for a device if you have not modified anything)

  1. Mount the pendrive's partition to a folder

image_showing_arch_loader

mkdir /mnt/pendrive
mount /dev/sda1 /mnt/pendrive
ls /mnt/pendrive
  1. Change the directory the pendrive's and make the script executable

image_showing_arch_loader

cd /mnt/pendrive/arch-install-script/
chmod +x install.sh
./install.sh

Features

  • User-Friendly.

  • Interactive Execution: Step-by-step prompts for user control.

  • Informative: Details on each step's actions and methods.

  • Resumable: Picks up from the last completed step after exit.

Logging

This script utilizes a log.txt file to keep track of how many steps have already been executed and how many are left. It is recommended that you do not change any contents of this file unnecessarily.

But if something goes wrong incase of error in previous step.

Feel free to delete the log file so that the script starts from first step again.

Reference

How your partitions should look like after mounting and partioning:

lsblk

image_showing_arch_loader

How to check for network connectivity:

ping -c 1 google.com

image_showing_arch_loader

How to create the 3 partitions and give them types:

arch-screen0.mp4
  • Here the 800M partition is given type efi system, since boot/efi partition requires 500-800M

  • The 8G partition is given type linux swap because thats the size of my ram on VM. And its type is given linux swap

  • The rest of the free space is given to root and its type is correct by default for file system.

Which visudo line is supposed to be uncommented:

alt text

Which locale is supposed to be uncommented (if english speaking user):

alt text

Which grub line is supposed to be uncommented:

alt text