The error you're encountering:
texterror: no such device: PERSIST. error: file `/grubenv_abootctrl' not found.
is not uncommon when booting Android-x86 or LineageOS images in a virtualized environment like libvirt on ARM64. This issue typically arises because the image expects certain UEFI/GRUB configurations or device paths that are either missing or misconfigured in your virtual machine setup.
Missing or Incorrect Bootloader Configuration
The image is trying to access /grubenv_abootctrl, a file used by Android-x86's GRUB-based bootloader to manage boot entries (e.g., for A/B slot switching). This file is either:
libvirt.UEFI Firmware Compatibility
The QEMU UEFI firmware (edk2) used by libvirt may not fully support the bootloader logic expected by LineageOS for ARM64.
Storage Device Not Detected
The error no such device: PERSIST suggests the system cannot find the persistent storage partition (often used for /data or bootloader state in Android-x86).
ARM64-Specific Quirks LineageOS for ARM64 (especially in a virtualized environment) may have unofficial or experimental support, leading to bootloader issues.
/grubenv_abootctrl exists:
bashsudo mount -o loop,offset=$((512*2048)) lineage-22.1-20250202-UNOFFICIAL-virtio_arm64only.img /mnt ls /mnt/grubenv_abootctrl
Your libvirt domain XML should explicitly define:
xml<domain type='qemu'> <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/qemu-efi-aarch64/QEMU_EFI.fd</loader> <nvram>/var/lib/libvirt/qemu/nvram/lineage_VARS.fd</nvram> <boot dev='hd'/> </os> <devices> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/path/to/lineage-22.1-20250202-UNOFFICIAL-virtio_arm64only.img'/> <target dev='vda' bus='virtio'/> </disk> <controller type='virtio-serial'/> <controller type='usb' model='qemu-xhci'/> </devices> </domain>
vda).virtio for storage (not USB emulation).QEMU_EFI.fd for AArch64).If the VM still tries to boot from USB, override the boot order in libvirt:
bashvirsh boot --domain <your-vm-name> --harddisk --persistent
Or edit the XML to disable USB boot:
xml<boot dev='hd'/> <boot dev='cdrom'/> <!-- Optional, if needed -->
If the image lacks /grubenv_abootctrl, it may need to be rebuilt with proper GRUB support:
mkbootimg or abootimg to repack the boot image.textroot=/dev/vda1 androidboot.hardware=qemu androidboot.force_normal_boot=1
Some users report success with custom UEFI builds for ARM64:
bashsudo apt install qemu-efi-aarch64
libvirt to the correct firmware path (e.g., /usr/share/qemu-efi-aarch64/QEMU_EFI.fd).Test outside libvirt to isolate the issue:
bashqemu-system-aarch64 \ -machine virt \ -cpu cortex-a72 \ -smp 4 \ -m 4G \ -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \ -drive file=lineage-22.1-20250202-UNOFFICIAL-virtio_arm64only.img,format=raw,if=virtio \ -nographic
libvirt-specific (e.g., XML misconfiguration).libvirt).libvirt XML to enforce virtio boot.dmesg, journalctl -u libvirtd) for storage/UEFI errors.Have you tried booting this image outside of libvirt (e.g., with QEMU directly)? If so, did you encounter the same error?
Vibe can make mistakes. Check answers. Learn more