Skip to content

Instantly share code, notes, and snippets.

@kyberorg
Last active September 7, 2018 13:05
Show Gist options
  • Save kyberorg/ad485e4bb9efe6827fc4b416f3306b08 to your computer and use it in GitHub Desktop.
Save kyberorg/ad485e4bb9efe6827fc4b416f3306b08 to your computer and use it in GitHub Desktop.
Installing Arch Linux On a Vultr Server

Installing Arch Linux On a Vultr Server

This is a minimal installation guide targeted to get Arch Linux running on Vultr. For simplicity, 'time zone', 'hostname', 'locale' and 'initramfs' are omited, you can configure them latter by yourself.

Partition the disks

For simplicity, we use single root partition.

# fdisk /dev/vda
# n
# enter(use default)
# enter(use default)
# enter(use default)
# enter(use default)
# w

Format the partitions

# mkfs.ext4 /dev/vda1

Mount the file systems

# mount /dev/vda1 /mnt

Install the base packages

# pacstrap /mnt base

Fstab

# genfstab -U /mnt >> /mnt/etc/fstab

Chroot

# arch-chroot /mnt

Network configuration

# systemctl enable dhcpcd

Root password

# passwd
# (enter your passwd)
# (enter again)

Boot loader

# pacman -S grub
# grub-install /dev/vda
# grub-mkconfig -o /boot/grub/grub.cfg

SSH

# pacman -S openssh
# systemctl enable sshd

Also add you id_rsa.pub to authorized_keys

mkdir ~/.ssh
pacman -S wget
wget https://some.site/key -O ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Install python for Ansible

pacman -S python

Shutdown

# exit
# shutdown now

Finally, goto https://my.vultr.com/ and remove ISO. (your arch will start to boot)

References

  1. Offical arch linux installation guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment