Last active
January 13, 2024 08:42
-
-
Save adyavanapalli/f01d3dbd89e268fd717a2902dd8b8832 to your computer and use it in GitHub Desktop.
Arch Linux Installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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