Skip to content

Instantly share code, notes, and snippets.

@adyavanapalli
Last active January 13, 2024 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adyavanapalli/f01d3dbd89e268fd717a2902dd8b8832 to your computer and use it in GitHub Desktop.
Save adyavanapalli/f01d3dbd89e268fd717a2902dd8b8832 to your computer and use it in GitHub Desktop.
Arch Linux Installation
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
if [[ $(cat /sys/firmware/efi/fw_platform_size) != 64 ]]; then
echo "ERROR: Bad fw_platform_size."
exit 1
fi
#PASSPHRASE=""
#DEVICE=""
#SSID=""
iwctl --passphrase "$PASSPHRASE" station "$DEVICE" connect "$SSID"
if ! ping -w 3 archlinux.org; then
echo "ERROR: archlinux.org is unreachable."
exit 1
fi
#TIMEZONE=""
timedatectl set-timezone "$TIMEZONE"
#DISK="/dev/X"
sgdisk --zap-all "$DISK"
sgdisk -o "$DISK"
sgdisk -n 1:2048:+1G -t 1:EF00 "$DISK"
sgdisk -n 2:0:0 -t 2:8300 "$DISK"
partprobe "$DISK"
mkfs.fat -F32 ${DISK}1
mkfs.ext4 ${DISK}2
echo "Partitioning and formatting complete."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment