Install Arch (UEFI)
Published - 2020-03-31

# after booting into arch from usb

# connect to wifi (if not connected via ethernet)
(follow prompts to connect)

# make sure you know which drive you're installing on
# (assuming /dev/sda from this point on)

# create partitions
cfdisk /dev/sda
    # delete any existing partitions
    # and create 3 new partitions
    1. 300M : type = EFI System (/dev/sda1)
    2. 1G : type = Linux swap (/dev/sda2)
    3. remainder: type = Linux filesystem (/dev/sda3)
# make sure everything looks right with:
fdisk -l

# format new partitions
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda3
mkswap /dev/sda2

# mount 
mount /dev/sda3 /mnt
swapon /dev/sda2

# edit mirrors list for faster downloads
vim /etc/pacman.d/mirrorlist
#    ( move closest mirrors to top or comment others out )

# do actual install
pacstrap /mnt base base-devel linux linux-firmware vim

# generate fstab
genfstab -U -p /mnt >> /mnt/etc/fstab
# make sure it looks ok
cat /mnt/etc/fstab

# move into installed system to configure
arch-chroot /mnt

# install and enable networkmanager
pacman -S networkmanager
systemctl enable NetworkManager

# set hostname
echo "your-hostname" > /etc/hostname

# locale and timezone stuff
vim /etc/locale.gen
# ( uncomment 2 en_US entries )

echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8

ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

# set root password
# ( and enter new password 2ce )

# install and configure grub
pacman -S grub efibootmgr dosfstools os-prober mtools
mkdir /boot/EFI
mount /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --bootloader-id=grub_uefi
grub-mkconfig -o /boot/grub/grub.cfg

# exit arch-chroot, unmount and reboot
umount -a