Arch
-
vmctl start -c -B cdrom <vm-name> -
Press
<TAB>, then enterconsole=ttyS0,115200 -
The problem may occur with loading
/dev/disk/by-label/ARCH_<SMTH> -
To fix it you need to create
/dev/disk/by-label/if needed -mkdir -p /dev/disk/by-label/ -
Then check
blkid, andln -s <path-to-iso-that-was-returned> /dev/disk/by-label/ARCH_<SMTH>ln -s /dev/sr0 /dev/disk/by-label/ARCH_202206 -
exit from that console
-
login as
root -
check if network is working using
ping archlinux.org -
timedatectl set-ntp true -
check what disk you need to format using
fdisk -l -
run
cfdisk <your-disk> -
choose
dos -
partition scheme - 2G swap, 23G /, 25G /home
-
mark root as bootable
-
/dev/vda1 - swap, /dev/vda2 - /, /dev/vda3 - /home
-
Formatting
-
mkfs.ext4 -L ROOT /dev/vda2 -
mkfs.ext4 -L HOME /dev/vda3 -
mkswap -L SWAP /dev/vda1 -
Mount
-
mount /dev/vda2 /mnt -
mkdir -p /mnt/home -
mount /dev/vda3 /mnt/home -
swapon /dev/vda1 -
Installation process
-
pacstrap /mnt base linux linux-firmware -
genfstab -U /mnt >> /mnt/etc/fstab -
arch-chroot /mnt -
ln -sf /usr/share/zoneinfo/UTC /etc/localtime -
hwclock --systohc -
install editor (for example:
pacman -S vim) -
edit /etc/locale.gen and uncomment
en_US.UTF-8 UTF-8 -
locale-gen -
Create /etc/locale.conf and insert
LANG=en_US.UTF-8 -
Create /etc/hostname and insert hostname
-
set root password using
passwd -
Bootloader
-
pacman -S syslinux -
syslinux-install_update -i -a -m -
Fix /boot/syslinux/syslinux.cfg
-
in lines with
APPENDchangeroot=/dev/sdaXtoroot=<your-root-partition> -
in the end of
APPENDlines addconsole=ttyS0,115200 -
you should fix it for both: and for
archsection, and forarchfallbacksection
-
-
End of basic install
-
exit from chroot
-
umount -R /mnt -
poweroff -
Now boot your vm and connect to serial console using
vmctl start -c <vm-name> -
Fix networking
-
Create file /etc/systemd/network/20-wired.network and add this to it:
[Match]
Name=enp0s2
[Network]
Address=
Gateway=
Address=
Gateway=
-
systemctl enable systemd-networkd -
systemctl start systemd-networkd -
Fix /etc/resolv.conf
- Add
nameserver <gateway-ipv4-addr>
- Add
-
Update your system using
pacman -Syu -
Add your own user and add it to wheel group
-
useradd -m -G wheel <username> -
Install and configure sudo
-
pacman -S sudo -
Edit /etc/sudoers
- Uncomment line this line
%25wheel ALL=(ALL:ALL) ALLor this%25wheel ALL=(ALL:ALL) NOPASSWD: ALL, if you want to allow sudo without password
- Uncomment line this line
-
Setup sshd
-
pacman -S openssh -
Edit /etc/sshd/sshd_config
-
Change
PasswordAuthenticationfield to no` -
Change
PermitRootLoginfield tono -
Change
PubkeyAuthenticationfield toyes
-
-
Make in your user's home dir folder .ssh with 700 permissions
mkdir -m 700 /home/<your-user-home-dir>/.ssh
-
Add your public key to
/.ssh/authorized_keys -
systemctl enable sshd -
systemctl start sshd -
Try to connect to your server using ssh with key
-
It is recommended to
poweroffyour VPS and turn it on usingvmctl start <vm-name>(maybe you will need to wait around 30 seconds or more) -
If you having some issues with connecting, try to connect to serial console using
vmctl console <vm-name>