UTM: Ubuntu 20 AArch64 image from gallery can't boot on Apple M1 "BdsDxe: failed to load Boot0001"
I figured out a workaround, see below
Describe the issue Followed directions from gallery to install Ubuntu 20 AArch64. Resulted in this error:
(Note, I had same result trying to install Fedora 33 AArch64 in the same way)
BdsDxe: failed to load Boot0001 "UEFI misc device" [...]

Eventually goes to this screen

Configuration
- UTM Version: v2.0.22 (have also tested v2.0.21, v2.0.15, same result)
- OS Version: macOS 11.1 (since upgraded to 11.2.1, same result)
- Intel or Apple Silicon? Apple M1 (Air, 16GB RAM)
Crash log N/A
Debug log debug.log
Upload VM config.plist.txt
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 15
- Comments: 54 (9 by maintainers)
Links to this issue
Commits related to this issue
- system: use bootindex to order boot devices Fixes #2333 — committed to utmapp/UTM by osy 3 years ago
- system: use bootindex to order boot devices Fixes #2333 — committed to utmapp/UTM by osy 3 years ago
@scubachristopher @F4zii I was able to overcome this issue by:
exitat the UEFI shell and then navigating to the USB boot device manuallySee attached video for the sequence that worked for me.
https://user-images.githubusercontent.com/7576968/109203157-d1373c80-7771-11eb-91aa-d8dc24969b66.mov
I was able to debug the failure by logging from EDK2. There is a race condition in QEMU’s (emulated) USB device reset and OVMF enumerating the boot options. M1 macs are too fast and can enumerate the boot options before QEMU sets up the device. This race condition is why it occurs for some people and not others and also why it stops appearing if you enable debug logging.
Without thinking too hard how to prevent the race, the hack around is to have a 1 second wait between the device enumeration and boot option enumeration.
https://github.com/utmapp/edk2/commit/bca86ecf2e1124c8a931b0dbfc276c7280df35c7
Tried the same but the screen pops and closes within a second not sure whats the issue
I updated the guide for a workaround: https://mac.getutm.app/gallery/ubuntu-20-04#troubleshooting
In the meantime I will continue to investigate why the emulated USB disk drive is not seen as a boot device on ARM64 builds of QEMU.
I ran into the same issue when installing Kali Linux on host Macbook M1, Big Sur.
Apparently, boot sequence was looking for the missing file
startup.nsh.At EFI cli, you can type
fs0:\efi\[your_OS]\grubx64.efito boot. You can use tab completion to figure out the directory. In my case:fs0:\efi\kali\grubx64.efi.When on the OS, hope onto
rootand create the filestartup.nshmanually.echo '\EFI\kali\grubx64.efi' > /boot/efi/EFI/kali/startup.nsh"(change the name accordingly)same problem here, ive tried waiting but it doesnt get past this screen it was working for a while on kernel version 5.04.0-99 but the newer kernel versions > 5.04.0-100 doesnt seem to work i read in a different thread that this could be due to force stopping the VM causes drive corruption maybe ?
@Henrb Thank you so much! Also, just to expound on your answer, once the vm is booted and you are presented with the
Shell>, you can typeexitto get back to the menu that shows theBoot Maintenance ManagerthenBoot from File.From here you can navigate to
kali/grubaa64.efias mentioned.In Drives, change the Interface from VirtIO to NVMe. I think there might be a problem in the EFI drivers. I’ll look more into it.
EDIT: oh this is before installing Ubuntu? So it’s failing to boot from the ISO?
I solved this problem on arm architecture.follow this steps,it’s worked for me.
I solved the issue with downloading Ubuntu Server 22.04 for ARM, it seems that I either was trying to install amd version or the iso just not compatible for now.
I suggest a permanent fix in #4002
this video helped me resolve the issue. For me the problem was also the wrong iso version. The one linked in the description solved my problem.
Hello, I had the case for the installation of kali linux arm for mac m1 download on download site, you have to go to the uefi settings and manually launch the launch file, launch> echap bios> boot maintenance manager > boot for files, find the file to install on the hard drive in the location “grubaa64.efi” thanks google trad, Regards henrb.
This issue isn’t about network?
So the winning combination for me that resulted in Ubuntu 20 installed with internet working:
Seems to be working, also worked for Fedora 33 (was using .xz instead of .iso before)