Skip to content

Instantly share code, notes, and snippets.

@pretorh
Created January 25, 2016 15:46
Show Gist options
  • Save pretorh/31b19ccd7f1568e3b156 to your computer and use it in GitHub Desktop.
Save pretorh/31b19ccd7f1568e3b156 to your computer and use it in GitHub Desktop.
Setup live arch vm

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment