Cannot boot from EFI image on aarch64

Bug #1925417 reported by Ravishankar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

I am unable to boot from a EFI disk image on aarch64 qemu.

I have qemu built and installed from sources on a jetson-nano

qemu-system-aarch64 -version
QEMU emulator version 5.2.50 (v5.2.0-3234-gbdee969c0e)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

KVM and and virtio are enabled in host kernel.

Now I want to boot a ChromiumOS image. I have the image downloaded from here:

https://chromium.arnoldthebat.co.uk/?dir=daily

The image looks fine:

rreddy78@jetson-nano:~/Downloads$ fdisk -lu chromiumos_image.bin
Disk chromiumos_image.bin: 6.2 GiB, 6606109184 bytes, 12902557 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C5B6CA94-0AF1-374E-90B5-A5CF4DC1FF51

Device Start End Sectors Size Type
chromiumos_image.bin1 4513792 12902508 8388717 4G Linux filesystem
chromiumos_image.bin2 20480 53247 32768 16M ChromeOS kernel
chromiumos_image.bin3 319488 4513791 4194304 2G ChromeOS root fs
chromiumos_image.bin4 53248 86015 32768 16M ChromeOS kernel
chromiumos_image.bin5 315392 319487 4096 2M ChromeOS root fs
chromiumos_image.bin6 16448 16448 1 512B ChromeOS kernel
chromiumos_image.bin7 16449 16449 1 512B ChromeOS root fs
chromiumos_image.bin8 86016 118783 32768 16M Linux filesystem
chromiumos_image.bin9 16450 16450 1 512B ChromeOS reserved
chromiumos_image.bin10 16451 16451 1 512B ChromeOS reserved
chromiumos_image.bin11 64 16447 16384 8M unknown
chromiumos_image.bin12 249856 315391 65536 32M EFI System

Partition table entries are not in disk order.

Now I try booting like this:

qemu-system-aarch64 -M virt -m 2048 -smp 2 -cpu host -enable-kvm \
-device usb-ehci -device usb-kbd -device usb-mouse -usb -serial stdio \
-device virtio-gpu-pci,virgl=on,xres=1600,yres=900 -display sdl,gl=on \
-device virtio-blk-device,drive=hd \
-drive if=none,file=chromiumos_image.bin,format=raw,id=hd \
-netdev user,id=mynet \
-device virtio-net-device,netdev=mynet \
-bios edk2-aarch64-code.fd -no-reboot

But I am unable to boot.

Memory Type Information settings change.
[Bds]Booting UEFI Misc Device
 BlockSize : 262144
 LastBlock : FF
[Bds] Expand VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00) -> <null string>
BdsDxe: failed to load Boot0001 "UEFI Misc Device" from VenHw(93E34C7E-B50E-11DF-9223-2443DFD72085,00): Not Found

and

[Bds] Expand VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A00000000) -> <null string>
BdsDxe: failed to load Boot0002 "UEFI Misc Device 2" from VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A00000000): Not Found

Revision history for this message
Ravishankar (rreddy78) wrote :

When i try to do it manually using the instructions provided here:

https://mricher.fr/post/boot-from-an-efi-shell/

I see that

Mapping table
      FS0: Alias(s):HD0m:;BLK4:
          VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A00000000)/HD(12,GPT,49037CF8-B2EF-5B4B-8CCE-EF5803A9E8B3,0x3D000,0x10000)
    BLK13: Alias(s):
          VenHw(93E34C7E-B5

BLK4 is not having any EFI file.

Revision history for this message
Ravishankar (rreddy78) wrote :

Hi,

This is not a bug with QEMU. Its a problem with ChromiumOS qemu image issue which does not have a valid EFI partition for booting on qemu with EDK2

Please close this ticket.

Thomas Huth (th-huth)
Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.