Prepare a disk image
Create and format partitions
- Create disk image, create EFI and root partitions.
- Mount as loopback devices (using
losetup
) and format partitions.
- Mount partition images to local filesystem.
Add the base Arch ARM installation
- Untar aarch64 Arch base image to root partition.
- Add
/etc/fstab
based on image partitions (genfstab -U /mnt
works pretty well).
- Unmount etc.
Prepare QEMU
- Install
qemu-arch-extra
(repo) and edk2-avmf
(AUR). To use virt-manager
as your GUI front-end:
sudo pacman -S virt-manager qemu-arch-extra-headless
yay -S edk2-avmf
Create the virtual machine
- Set up QEMU machine aarch64/virt with prepared disk image and direct kernel/initramfs booting from the Arch base image files. Boot.
Configure the installation
- Link
/boot/Image.gz
to /boot/vmlinuz-linux
.
- Install GRUB. Update.
Final setup
- Remove direct kernel booting from QEMU settings. Add in display and input hardware.
Done
- Boot and do any remaining setup in the same way as you normally would.
7 Likes