Uefi Shell Install Windows

2 views
Skip to first unread message

Karriem Drewery

unread,
Aug 4, 2024, 6:32:35 PM8/4/24
to notaperderp
Ifyou have installed Windows in UEFI mode, you can call Windows Boot Manager directly typing FS0:\EFI\Microsoft\Boot\bootmgfw.efi Enter into the EFI shell. If this isn't found try FS0:\EFI\BOOT\BOOTX64.EFI (case doesn't matter).

If you have legacy BIOS installation then Clover will not boot it. You could download rEFInd-flashdrive an put this on a USB key as described in its documentation. If you then boot that it should be able to automatically detect and boot legacy Windows installations.


From there, a quick ls confirmed that I was in the right place by showing me alist of files including the EFI directory that I knew rEFInd was installed in.And then, it was just executing the right EFI executable. Fortunately, theUEFI-shell has tab-completion.


I'm trying to set up a virtualized windows installation with qemu, using VGA passthrough, so I could ditch my dedicated windows partition, and generally have an easier life. I have followed the instructions on the arch wiki:


I have used vfio-pci, instead of the old pci-stub method. I'm not using the intel arbiter patch, because if I understand it correctly, that is supposed to be used when you are passing in the same vga that you are using on the host (which is not the case for me).


I have read in the wiki's troubleshooting section that if this happens, make sure you have a valid boot media. Ok, so I tried getting the arch linux installer, and booting that, but that gives me the exact same result, so I'm assuming the problem lies elsewhere.


No looks good to me. Tho I don't know if it will use the second flash image for efi vars or not, I copied the full uefi image (from ovmf-git from the aur) to the VM dir and have it writeable.

The -boot flags are ignored if you don't use the BIOS.


Here I document my trial-and-error methods for booting the Windows OS install when the BIOS boot order was getting ignored. Another alternative title might be How I managed to install Windows when I could not boot from any USB devices. (Tested USB DVD, USB Flash Drives).



This was a new device, freshly unpacked and booted up. I experienced issues starting Windows for the first time. "OS goes to "Just a moment" for a very long time. Then the sysprep cmd window launches, then nothing happens." This issue is identical to this reddit post and has been posted a few times on the LattePanda forum already.



I followed the LattePanda documentation on reinstalling Windows to create the bootable USB stick. I set the boot order in BIOS, but it still just kicked me back to the pre-installed windows.



So I tried a different USB stick (sometimes they can be fussy) but the results were the same.

It just refused to boot to USB! Always defaulting back to the pre-installed Windows.



Next I grabbed a windows 10 home DVD and plugged in my trusty USB 2.0 DVD burner. It has it's own power source, so I was sure there wouldn't be any power draw issues. I accessed the BIOS and set my boot order. To my dismay, the system still refused to boot to USB (Just loaded the pre-installed Windows again.)



Next I used Microsoft's media creation tool and created a Windows 10 32-bit bootable USB stick. (32-bit because I am working on the 2G/32G version of the LattePanda, I shouldn't need the 64-bit version... or so I thought. read on!)

While it was downloading I did other stuff to shake my frustrations. Once finished, I connected the newly imaged USB stick to a different, working PC. It booted to the windows setup as expected.



I plug the USB stick into the 'Panda, change bios boot order settings... and it goes right back to the pre-installed windows. Won't boot from the USB stick or the USB DVD.



Ok, so that won't work. I get into the Windows troubleshooting start menu and I select the option to restore my PC, don't keep any settings. I start this process.



Around 49%, I get hit with a brief power outage. Hmm... at least it wasn't firmware, right? I wait for a bit to make sure the power is stable again, then I start it up. That's when I am greeted by a not-so-nice message:

"The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click 'OK' to restart the computer, and then restart the installation.".

Picture:







I got this same mesage no matter how many times I tried to F8 or otherwise access any windows safe mode.



Great. So now my pre-installed image is shot and I can't get this thing to boot from any USB device.

I really didn't feel up to installing and configuring a PXE server just for a single Windows 10 install. So I kept on tinkering.. and while tinkering, I noticed an entry on the BIOS exit screen labeled "Launch EFI Shell from filesystem device".





I ran this and after a moment I was provided a command line to the EFI shell. Cool. Reading the screen I notice the mount points and read to figure out which is my USB device. In this case, fs1:





I mounted my USB device by typing fs1:

then I typed cd efi

then I typed cd boot

then I typed in bootia32.efi

I was immediately notified that the Image type IA32 is not supported by this x64 shell. so, Microsoft used the Itanium efi on the x86 version of Windows 10 home? That just doesn't make sense.





So, once again I used Microsoft's media creation tool and created a Windows 10 64-bit bootable USB stick.



Once the stick was ready, I launched EFI Shell from the BIOS. Ran these commands (again):



fs1:

cd efi

cd boot

bootx64.efi







Success! The shell launched the Windows setup program from the USB device.

Because of the problems I was having, I decided to delete the hard disk partitions and reinstall windows on a clean 'unallocated space' emmc disk.







Afterwards, on another computer I downloaded the drivers from the LattePanda GITHub repository and transferred via the same USB stick. Then I proceeded to install drivers for all the unknown devices in the device manager. (it was a pretty long list.)



I had neglected to remove the USB stick from the LattePanda when I rebooted to finish installing the first of the device drivers. To my surprise, the 'Panda booted from the USB stick. So after the clean OS install my LattePanda began properly booting from the USB devices.



I removed the USB stick, rebooted into Windows and continued with device driver installation. I've since then updated Windows and have let the device 'burn in' for a day. It seems to be working perfectly now.



I hope you find this post informative and helpful. Use these instructions at your own discretion.


This will only tell you basic information about PCI bus location bus type (SATA), device type (HD, usb etc) and partition type (GPT). Try to guess your disk. If you get it wrong thats okay you'll confirm in the next step.


Ok, so I followed the directions, not having a geek->human translator, and after I couldn't find anything with EFI in the UEFI shell, I typed exit, hit enter, and then things booted up as they should have. This should be put into the guide. Just saying.


4% to go...never mind, no errors found. this is real time. I have a spinning thing with ubuntu on the screen. now the spinning thing is gone and ubuntu is on the bottom. just looked again, there is a small spinning thing in the bottom right corner.


Now there is a gradient from pink-deep purple screen with what appears to be a line etching of a panther. holy shit, i think I did it.Moral of the story, open UEFI shell, type mount, hit enter. Type mount [disk blk name] (ex, mine showed up as blk0) Before you go into the uefi shell from the boot menu, move the highlighted line over your usb and write down the name and details. That will make things a lot easier than guessing your drive name. after that, type fs0. you will get a weird line of text. then type ls. Once the other error[?] message shows up, give up and type exit, then hit the enter key. The system will install as normal, for whatever reason.


@jonny

Do the free version patch bootmgfw.efi?

Make a bootable USB-stick with Windows 7 by any way.

Then copy patched bootmgfw.efi with name bootx64.efi to :\EFI\Boot

Install OS.

Then copy patched bootmgfw.efi to \EFI\Microsoft\Boot\


hi bro like you iam trying to install windows 7 on my laptop i have a ryzen 5 3500u and when i start windows 7 installation when my laptop reboot for expanding windows files i stuck at starting windows and windows logo just glow i just wanna know does your problem fixed?


The Unified Extensible Firmware Interface (UEFI, successor of the EFI) is an interface between operating systems and firmware. It provides a standard environment for booting an operating system and running pre-boot applications.


It is distinct from the "MBR boot code" method that was used by legacy BIOS systems. See Arch boot process for their differences and the boot process using UEFI. To set up UEFI boot loaders, see Arch boot process#Boot loader.


Under UEFI, every program whether it is an operating system loader or a utility (e.g. a memory testing or recovery tool), should be an EFI application corresponding to the UEFI firmware bitness/architecture.


An x64 UEFI firmware does not include support for launching 32-bit EFI applications (unlike x86_64 Linux and Windows versions which include such support). Therefore the EFI application must be compiled for that specific firmware processor bitness/architecture.


If the command returns EFI32 then it is IA32 (32-bit) EFI firmware. If it returns EFI64 then it is x64 EFI firmware. Most of the Macs do not have UEFI 2.x firmware as Apple's EFI implementation is not fully compliant with UEFI 2.x specification.


For a 64-bit Windows on a 64-bit UEFI it will be System Type: x64-based PC and BIOS mode: UEFI, for a 32-bit Windows on a 32-bit UEFI - System Type: x86-based PC and BIOS mode: UEFI. If the "BIOS mode" is not UEFI, then Windows is not booted in UEFI mode.

3a8082e126
Reply all
Reply to author
Forward
0 new messages