Last active
September 24, 2018 20:35
-
-
Save flying-sheep/7059d4f2e86a699164a98ca503c8b551 to your computer and use it in GitHub Desktop.
Hetzner Arch setup script
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
mkfs.ext4 /dev/sda1 | |
mount /dev/sda1 /mnt | |
pacstrap /mnt base grub openssh qemu-guest-agent | |
genfstab -U /mnt >> /mnt/etc/fstab | |
arch-chroot /mnt | |
# Basic setup | |
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime | |
hwclock --systohc | |
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen | |
locale-gen | |
localectl set-locale LANG=en_US.UTF-8 | |
loadkeys de-latin1 | |
localectl set-keymap --no-convert de-latin1 | |
hostnamectl set-hostname brahma | |
# Network | |
echo > /etc/hosts <<EOF | |
159.69.114.159 localhost | |
2a01:4f8:c010:20d:: localhost | |
159.69.114.159 brahma | |
EOF | |
echo > /etc/systemd/network/10-ens3.network <<EOF | |
[Match] | |
Name=ens3 | |
[Network] | |
DHCP=yes | |
EOF | |
# Boot | |
grub-install /dev/sda | |
grub-mkconfig -o /boot/grub/grub.cfg | |
mkinitcpio -p linux | |
# Services | |
systemctl enable sshd | |
systemctl enable systemd-networkd | |
systemctl enable systemd-resolved | |
systemctl enable dhcpcd | |
systemctl enable qemu-ga | |
# cat /etc/resolv.conf | |
# ; generated by /usr/sbin/dhclient-script | |
# nameserver 213.133.100.100 | |
# nameserver 213.133.98.98 | |
# nameserver 213.133.99.99 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment