Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 ARM iso hung at the boot screen #2

Closed
nguyenthienminh opened this issue Jan 5, 2022 · 53 comments
Closed

Windows 10 ARM iso hung at the boot screen #2

nguyenthienminh opened this issue Jan 5, 2022 · 53 comments

Comments

@nguyenthienminh
Copy link

Yeah, the installer got hung at the boot logo for a long time. I left it for hours and still nothing. Any ideas?
image

@raspiduino
Copy link
Owner

raspiduino commented Jan 5, 2022

Hello and welcome to the repo!

  • Which version of Windows ARM are you using (like the build, ...)? Can you provide more details like where did you get the iso from (did you make it using uupdump.ml or you got it from the internet).
  • Can you provide the QEMU version, the command line that you passed to QEMU?
  • Where did you get the UEFI firmware from? (This repo or another place?)

Thank you!

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 6, 2022

Update: I happened to use the newer version of 10 ARM (version 2004 and later) which doesn't work. I had to use version 1909 to make it work, but it still BSODs when booting the installer with a ACPI_BIOS_ERROR blue screen: 2022-01-05 14 00 28
I looked in the BIOS and the RAM amount reported is 0MB: 2022-01-05 14 00 46
Also, more info:

@raspiduino
Copy link
Owner

raspiduino commented Jan 6, 2022

Well, I also tried that firmware (some years ago) but if you feel is just old for now, you can get the new prebuilt UEFI firmware online. You can get one from here. Remember to choose AARCH64 version for QEMU.

Also, there is a bug in qemu virt machine (this have been fixed in 5.x). You said you use the QEMU from 2018, so it's equal to version 3.x. In that case, virt-2.12 seems to work for Windows ARM. If it still results in error, try disabling highmem and enable EL2 by using -machine virt-2.12,highmem=off,virtualization=on and see if it works. (I wonder why you choose this QEMU version)

I have read somewhere (didn't remember to save the link, sorry) that Windows 20H1 arm64 and later doesn't work on QEMU without KVM (virtualization, not emulation). So if you want some recent Windows arm64 on QEMU, you should use KVM (you can try on some hardware like RPi and other SBCs)

Also, you should change the display from VGA to ramfb, as VGA is usually for x86 emulation. -device VGA to -device ramfb.

Again, try this:

qemu-system-aarch64.exe ^
-M virt-2.12,highmem=off,virtualization=on^
-cpu cortex-a57 ^
-smp 3 ^
-m 3072M ^
-pflash QEMU_EFI.img ^
-pflash QEMU_VARS.img ^
-device ramfb^
-device nec-usb-xhci ^
-device usb-kbd ^
-device usb-mouse ^
-device usb-storage,drive=install ^
-drive if=none,id=install,format=raw,media=cdrom,file=.\WindowsARM.iso ^
-device usb-storage,drive=drivers ^
-drive if=none,id=drivers,readonly=on,file=.\drivers.vhdx ^
-device virtio-blk,drive=system ^
-drive if=none,id=system,format=raw,file=.\system.vhdx

Try this and see if it works! Thank you for taking a look at this repo and feel free to ask about this.

Edit: If you find it too hard for installing using the installer, you can also create a VHD, mount it on Windows, then use dism to apply the wim image to it (extracted from the iso) and then put efi files on it, and it works normally just like using the installer.

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 6, 2022

The BIOS file kind of got really corrupted and such caused this error when executed the cmdline:
image
If I use the old BIOS, the cmdline will (once executed) got this error:
image
And yes, if the video card's emulation files are not found, then the machine won't start again:
image
But interestingly, the serial display actually works and showed the bios. But then when I chose to boot from DVD, it'll display a prompt to press a key to boot into DVD, then it'll stop at a blinking cursor.
So I changed the display type too back to VGA, and this time, it boots fine.
Weird.

@raspiduino
Copy link
Owner

raspiduino commented Jan 6, 2022

No it is not corrupted, it just not fit the QEMU's flash. The QEMU's flash is 64MB in size and you should have the firmware also in 64 MB.

From this, on Linux you can use dd if=/dev/zero bs=1M count=64 of=QEMU_EFI.img and then dd if=QEMU_EFI.fd bs=1M of=flash0.img conv=notrunc.

On Windows you can use fsutil file createnew QEMU_EFI.img 67108864 to create a 64MB file and then use some hex editor you can copy the content of QEMU_EFI.fd to the beginning of the new file. QEMU will happily accept it.

EDIT: Windows does require a graphic display so even it output to serial, it can't show you the installer through that.
EDIT #2: QEMU can work without vgabios-ramfb.bin but it requires driver inside the UEFI firmware, so i guess the old firmware doesn't support ramfb.

@nguyenthienminh
Copy link
Author

Oh well, it still works, so yeah. It's currently at the installer, which is going to take not a long time (maybe). I sped it up using GVM (KVM for Windows) too, so yeah, it's going to be a little bit faster.

@raspiduino
Copy link
Owner

raspiduino commented Jan 6, 2022

Oh man, which platform are you running on? Is your host platform x86 or ARM?

If you are using an x86(_64) machine, you cannot use KVM for running an ARM64 VM! KVM requires the guest to use the same instruction set as the host processor.

@nguyenthienminh
Copy link
Author

Woopsie. Let me uninstall GVM.

@raspiduino
Copy link
Owner

Excuse me, can you provide the link to GVM? I have googled it but couldn't find any information. Thanks!

@nguyenthienminh
Copy link
Author

Here's the link: http://github.com/google/Android-emulator-hypervisor-driver-for-amd-processors

@raspiduino
Copy link
Owner

Thanks! Is your VM ok now?

@nguyenthienminh
Copy link
Author

Well, it booted the installer successfully, but it didn't detect the hard drive at all. Even after loading the driver, it still only appear a tiny 60MB volume on the "Choose a partition to install Windows" screen.

@raspiduino
Copy link
Owner

The line -drive if=none,id=system,format=raw,file=.\system.vhdx
Try changing it to format=vhdx and see if something better

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 6, 2022

That fixed it. Thanks! Now just to see how much time it's going to install... (already 10 mins so far)

@raspiduino
Copy link
Owner

Good to see it works! If you have any other questions, feel free to put a comment here. Thanks!

@nguyenthienminh
Copy link
Author

Oh. So now it's really stuck at the "Installing updates" screen for 30 mins already:
image

@nguyenthienminh
Copy link
Author

Oh nevermind, it's unhung anyways

@raspiduino
Copy link
Owner

You should be patient. Emulation is always slower than you expected.

If you want to know is things in process (eg if is hang or not), you can press Shift+F10 to open cmd and then open task manager from it.

@nguyenthienminh
Copy link
Author

Yeah, I opened the taskmgr like that, and.... the CPU got capped at 100%, that's why it's so slow

@nguyenthienminh
Copy link
Author

oh, and it refused to boot from the hard drive. It only wants to boot from the DVD.

@raspiduino
Copy link
Owner

Ok you should remove the cd from qemu. Or you can go to firmware setting and choose to boot from hard drive

@nguyenthienminh
Copy link
Author

Yep, I go into the firmware settings, chose the hard drive and it refused to boot. Just exited out to the BIOS screen. When I removed the DVD, it wants to network boot.

@raspiduino
Copy link
Owner

Is the installer show some errors or it just ask you to reboot?

@nguyenthienminh
Copy link
Author

Oh nevermind, by a little probing found out the device name. The BIOS menu is just so messy...

@raspiduino
Copy link
Owner

raspiduino commented Jan 7, 2022

Try all of the options and you will find the one correct :)

@nguyenthienminh
Copy link
Author

I saved the statistics into a .txt file, once the install's done i'm going to upload the statistics up here

@nguyenthienminh
Copy link
Author

Can I let my computer sleep when the VMs doing this? I have to go to another place so yeah. image

@raspiduino
Copy link
Owner

raspiduino commented Jan 7, 2022

You have to keep your computer on, of course.
Or you can pause the VM and when you come back you can unpause it.

@nguyenthienminh
Copy link
Author

oh, I already let it slept for... a while, and it kind of pauses the vm, but starting it up'll basically unpause it.

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 8, 2022

Huh, now it got stuck on the "Just a moment..." screen for a whole 2 hours (not included the time I let the computer hibernate and I let the VM pause, which is roughly 14 hours). Sometimes the VGA output got black, but moving the cursor kind of un-blacks it.
image

@raspiduino
Copy link
Owner

Well, black is normal, it just show black when you leave it for a long time, it will turn off the screen.

Keep the installer for some more time, and if the loop is endless, I will show you the way to bypass OOBE. (Sometimes QEMU is just to slow)

@nguyenthienminh
Copy link
Author

Yeah, it's 2 hours. I know how to skip OOBE mind you, so should I reboot the VM?

@raspiduino
Copy link
Owner

If you reboot the VM, it will show the error "please start the installation process again" or it will result in the endless loop again

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 8, 2022

I knew that, I'm skipped OOBE using the registry. Now Windows (really) didn't like that and started Automatic Repair, but I can easily skip that.

@raspiduino
Copy link
Owner

After get to the desktop, if you find the VM to slowly, you can try some optimize script on github for Windows ARM. Just search on google :)

@nguyenthienminh
Copy link
Author

Automatic Repair just crashed the entire VM. Now it's time to disable WinRE.

@nguyenthienminh
Copy link
Author

Well, after all that (I even skipped the OOBE), it still got stuck at the "Just a moment..." screen.

@nguyenthienminh
Copy link
Author

oh. now it's this.
image

@raspiduino
Copy link
Owner

Change -device virtio-blk,drive=system to -device usb-storage,drive=system

@nguyenthienminh
Copy link
Author

That certainly fixed the problem. However, I had to change the boot order. I also tweaked the res a little bit from 800x600 to 1024x768 in the BIOS so it looked more great in there.

@nguyenthienminh
Copy link
Author

And Windows kept booting and hanging at the spinning animation

@raspiduino
Copy link
Owner

Spinning? The boot screen with Windows logo?

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 10, 2022

Yeah. It is hanging there really, but the spinner is still spinning. It's already half an hour.

@raspiduino
Copy link
Owner

Have you boot to the desktop yet? (Since you skipped OOBE?

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 10, 2022

Nope, I had to do a full reinstall (using dism and bcdboot), because the normal way got stuck at the "Just a moment..." waiting screen.

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 10, 2022

Oh anyways, now it finally booted. QEMU is just so slow...

@raspiduino
Copy link
Owner

Be patient! :)

@nguyenthienminh
Copy link
Author

It's so slow!!!!!!!!!! (I reached the desktop but Explorer hasn't even loaded finished)

@raspiduino
Copy link
Owner

Buy an ARM-based SBC and run KVM on it (I currently do that) and it is much better

@nguyenthienminh
Copy link
Author

Explorer is literally crashing constantly because of the high CPU load.

@raspiduino
Copy link
Owner

If it is too slow, try booting to safe mode!

@nguyenthienminh
Copy link
Author

nguyenthienminh commented Jan 11, 2022

The specs are done!
10ARMStatistics.txt

@raspiduino
Copy link
Owner

If you have no more problems, please close the issue. If not, comment here and I will happily help you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants