Found the error; it was with the first GRUB line. linux /boot/Image root=/dev/sda1 rw
should be linux /boot/Image root=/dev/sda2 rw
as hinted by this snippet from https://github.com/lxc/lxc-ci/blob/master/images/archlinux.yaml
:
- trigger: post-files
action: |-
#!/bin/sh
set -eux
TARGET="x86_64"
[ "$(uname -m)" = "aarch64" ] && TARGET="arm64"
grub-install --target="${TARGET}-efi" --efi-directory=/boot/efi --no-nvram --removable
grub-install --target="${TARGET}-efi" --efi-directory=/boot/efi --no-nvram
grub-mkconfig -o /boot/grub/grub.cfg
sed -i "s#root=[^ ]*#root=/dev/sda2#g" /boot/grub/grub.cfg
# Rebuild initrd
sed -i 's#^MODULES=.*#MODULES=(virtio_pci virtio_scsi virtio_console)#' /etc/mkinitcpio.conf
sed -i 's#^PRESETS=.*#PRESETS=(default)#' /etc/mkinitcpio.d/*.preset
mkinitcpio -P
types:
- vm
Still not sure where busybox came from; I guess Arch Linux ARM’s EFI-stub image file uses it during boot before launching bash.
There are still some annoying issues to iron out, but so far the VM seems to be working well with a macvlan profile.