General setup of live arch VM
Setup on VM
- Boot the vm, select x86 / x86_64 and enter
- start ssh daemon:
systemctl start sshd
- change the root password
passwd
Setup ssh
- from the host, copy the local ssh key to the vm
ssh root@<server> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null 'mkdir -pv /root/.ssh'
rsync -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ~/.ssh/id_rsa.pub root@<server>:/root/.ssh/authorized_keys
- can now ssh in without password
ssh root@<server> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
Update packages
- optional: use a disk to save cached packages
- mount the drive
mkdir -pv <DIR_TO_SAVE_CACHED_FILES>/{sync,pkg}
ln -sv <DIR_TO_SAVE_CACHED_FILES>/sync /var/lib/pacman/sync
rmdir /var/cache/pacman/pkg
ln -sv <DIR_TO_SAVE_CACHED_FILES>/pkg /var/cache/pacman/pkg
- refresh packages and update keyring
- keyring must be updated first, else newer packages will fail verification
pacman -Sy --noconfirm archlinux-keyring
- do a full system update
pacman -Su --noconfirm
- make sure the package db is in latest db format
pacman-db-upgrade