Skip to content

Instantly share code, notes, and snippets.

@juliangroen
Last active July 14, 2020 17:42
Show Gist options
  • Save juliangroen/4dbff5d685ec2aeeb8712932de69e427 to your computer and use it in GitHub Desktop.
Save juliangroen/4dbff5d685ec2aeeb8712932de69e427 to your computer and use it in GitHub Desktop.

Partitions

Scheme

# efi boot - fat32 - 512MB
/dev/sda1

# root - ext4 - rest of drive
/dev/sda2

# swap - swapfile - same as main memory

File Systems

mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
swapon /dev/sda3

Mount Points

# efi boot
/mnt/boot
# root
/mnt

Enable wheel group in sudo

# using visudo uncomment the following line
%wheel ALL=(ALL) ALL

Add new user

useradd -m -g users -G wheel -s /bin/bash username

Install systemd-boot

bootctl --path=/boot install

Get PARTUUID for root and save it to a file

blkid /dev/sda2 > partuuid.txt

Create Arch entry

vim /boot/loader/entries/arch.conf
Contents of arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=${PARTUUID from partuuid.txt} rw

Replace Loader

vim /boot/loader/loader.conf
Contents of loader.conf
default       arch
timeout       4
console-mode  max
editor        no

Update Systemd-boot

bootctl --path=/boot update

Setup networking

Enable systemd-networkd services

systemctl enable systemd-networkd.service
systemctl enable systemd-resolved.service

Create systemd-networkd config files

Ethernet
/etc/systemd/network/20-wired.network
[Match]
Name=${eth_device_name}

[Network]
DHCP=yes
Wireless
/etc/systemd/network/25-wireless.network
[Match]
Name=${wlan_device_name}

[Network]
DHCP=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment