Connect to internet via Ethernet cable.
loadkeys fi
archinstallBoot into desktop, then
# Run .install.sh in a child shell on a live USB environment.
bash <(curl -fsSL https://eniemela.fi/api-v1/laptop-install.sh)If the Chaotic-AUR CDN returns HTTP 503, replace it with the geo mirror and rerun the installer:
sed -i 's|https://cdn-mirror\.chaotic\.cx|https://geo-mirror.chaotic.cx|g' .install.shInstall QEMU on Arch Linux:
sudo pacman -S --needed qemu-desktopFrom the repository root, download the latest Arch ISO and create a sparse 64 GiB test disk:
mkdir -p .vm
curl -L \
https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso \
-o .vm/archlinux-x86_64.iso
curl -L \
https://geo.mirror.pkgbuild.com/iso/latest/sha256sums.txt \
-o .vm/sha256sums.txt
(
cd .vm
sha256sum --check --ignore-missing sha256sums.txt
)
qemu-img create -f qcow2 ".vm/dotfiles.qcow2" 64GThe image is sparse, so it initially consumes little physical disk space. Start the VM:
qemu-system-x86_64 \
-machine q35,accel=kvm \
-cpu host \
-m 8G \
-smp 4 \
-device virtio-vga \
-display gtk \
-nic user,model=virtio-net-pci \
-drive file=".vm/dotfiles.qcow2",if=virtio,format=qcow2 \
-cdrom ".vm/archlinux-x86_64.iso" \
-boot once=dInside the Arch ISO, run the installer:
loadkeys fi
archinstallSelect /dev/vda as the target disk. It is the disposable virtual disk, not a
physical drive. When installation finishes, reboot:
rebootBecause QEMU uses -boot once=d, the VM should boot from the installed virtual
disk after reboot.
Immediately after installation, reboot should boot the installed disk because
the installer VM uses -boot once=d. To open it again later, run this from the
repository root.
qemu-system-x86_64 \
-machine q35,accel=kvm \
-cpu host \
-m 8G \
-smp 4 \
-device virtio-vga \
-display gtk,clipboard=on \
-device virtio-serial-pci \
-chardev qemu-vdagent,id=vdagent,name=vdagent,clipboard=on \
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
-nic user,model=virtio-net-pci \
-drive file="$PWD/.vm/dotfiles.qcow2",if=virtio,format=qcow2Install and start the clipboard agent once inside the virtual system.
sudo pacman -Syu spice-vdagent
sudo systemctl enable --now spice-vdagentd.socket
sudo reboot