Contribute
Register

<< Solved >> Stuck on "Windows could not prepare the computer to boot into the next phase" error

Status
Not open for further replies.
Joined
Mar 10, 2013
Messages
55
Motherboard
Gigabyte Z390 Aorus Pro Wifi
CPU
i9-9900K
Graphics
RX 580
Mac
  1. iMac
  2. MacBook Pro
  3. Mac Pro
Mobile Phone
  1. iOS
Hi Guys,

I've got a working Hackintosh with OpenCore 0.8.3 able to boot Monterey (12.6) from my Samsung 500GB NVMe. My hack also has a SanDisk 240GB SSD, a 4-TB internal HDD, and an 8-TB internal HDD. I use the last two just for data and can unplug them if need be for this install. What I'd like to have is Windows 11 on the 240GB SSD and be able to choose either that or macOS on the NVMe from OC.

I've got a bootable Win 11 USB I made using the ISO downloaded from MS and following a guide to format the USB FAT32 and split install.wim using wimlib. The USB boots fine and launches the Windows 11 installer. I can Shift-F10 to go play with diskpart and fix things as needed, and when I check the list of disks using diskpart I see that I've got the 240GB SSD as Disk 0.

My general process has been this
1. Erase the 240GB SSD using Disk Utility to make it a GUID partition mapped Mac OS Extended (Journaled) drive. This is giving me a 200MB EFI partition on disk0s1, and the rest as a Data partition on disk0s2
2. Boot the Windows USB and start the installer picking a custom install
3. Select and delete the macOS Data partition on the 240GB SSD (leaving the EFI partition alone). This gives me a 240GB SSD with a 200MB EFI and the rest as unused space.
4. Select the unused space and proceed with the Windows 11 install on that.

Invariably one of two things happens, both ending in the dreaded "Windows could not prepare the computer to boot into the next phase" error.

1. If I've prepped the EFI partition on the SSD by copying the efi folder from the Win11 USB to it, then my BIOS will let me select that disk as the first boot option and I'll get all the way past "Finishing up" where I'll then hit the error above.

2. If I try it with an empty EFI partition then I can't select the SSD as the first boot option in the BIOS, so I can either leave it on the NVMe or point it to the Win11 USB - both will cause me to hit the error above even sooner, basically right after telling Windows to install on the unused space.

I've tried playing with diskpart to delete and repartition the 240GB SSD for a 300MB FAT32 EFI partition and the rest as an NTFS partition which I later delete for free space in the Windows installer. This has not changed the outcome.

My BIOS does not allow me to disable the NVMe drive, but that drive is invariably coming up after the SSD no matter how I connect SATA cables to things, and as things currently stand my target for the Windows install is disk 0 (as reported by both Disk Utility in macOS and by diskpart in Windows).

What can I do to get past this problem?
 
Erase all the partitions on 240Gb SSD, through the windows installer, then install windows on empty space.

The EFI folder should be on the macOS hard drive, you don't need to leave a partition of 200 Mbs on windows drive.
Windows creates the partitions needed for himself.

If still persist, could be the windows 11 USB, try with one created from rufus.

Another option before going crazy is using Parallels VM
 
Erase all the partitions on 240Gb SSD, through the windows installer, then install windows on empty space.

The EFI folder should be on the macOS hard drive, you don't need to leave a partition of 200 Mbs on windows drive.
Windows creates the partitions needed for himself.

If still persist, could be the windows 11 USB, try with one created from rufus.

Another option before going crazy is using Parallels VM
I'm fairly sure that's wrong. It's contrary to the multiboot guide here https://www.tonymacx86.com/threads/guide-multibooting-uefi-on-separate-drives.198869/page-63, but moreover I just tried it and it definitely didn't work.

I gave it a shot using the Windows installer to delete both partitions leaving the whole SSD as unallocated space as you suggested, selected that unallocated space, and told it to install there. That got me to a quick failure as I described in (2) above.

I gave it another shot using diskpart to delete all the partitions on disk 0 (the SSD) leaving them as unallocated space that I was able to select in the Windows installer. That too got me to a mode 2 quick failure.

I used diskpart to delete all the partitions on disk 0 again, then used disk part to create a 300MB EFI partition and a primary partition using the remaining space. Then used diskpart to format the EFI as FAT32. I was able to then use Windows installer to select the unallocated space and proceed with an installation that got me to a type 1 failure as I described above. A type 1 failure makes it all the way through the following steps:

Copying Windows files
Getting files ready for installation
Installing features
Installing updates

Then it crashes with the "Windows could not prepare the computer to boot into the next phase" error as soon as it gets to "Finishing Up". I believe this is right before the first reboot that would occur in a normal Windows 11 install based on the videos I've watched.

So... Definitely seems to need an empty EFI folder formatted FAT32 in addition to some unallocated space. Yes, the installer does create three partitions in the unallocated space, but it seems to need that EFI partition to already be there.
 
That's no the correct partitioning on windows side. Why your bios doesnt allow you entering without this EFI partition?

I am thinking in some problem w/ the USB installer.

I would try to take out the NVMe and then do a clean install on the SSD of windows, that should work, if not ther would be the problem, with BIOS, or the SSD itself.

Go step by step until you find the failure.

But I think this is not related with opencore.

Are you entering windows through BIOS UEFI or through Opencore?

Are there any other files in the EFI of the NVMe than opencore files?

Check the UEFI options through the shell

https://linuxhint.com/use-uefi-interactive-shell-and-its-common-commands/
 
Thanks, @guindillas

I am entering Windows through BIOS UEFI. I press F12 and select the UEFI on the USB that will boot to the Windows installer. You may be right, there may be some problem with the USB. I'll follow that link and see what. I can learn.

Here's what I know so far:

Pretty much the most reliable way I can get a Type 1 failure where Windows actually attempts to install rather than erroring out before the Copying Windows Files step gets past 0% is to use diskpart to reformat the Disk 0 Part 1 EFI as FAT32. I think what this is really doing is guaranteeing that the partition is really empty.

I found in my BIOS that, although both diskpart and Disk Utility are showing my SSD as disk 0, the DVD drive I've got was sitting on SATA 0 and the 240GB SSD was on SATA 1. I adjusted my SATA cabling so that the SSD is on SATA 0 and the DVD is on SATA 5. I've been keeping my two data drives unplugged, but if connected they'd be SATA 2 and SATA 3.

Using the reliable method I've found for getting past the Copying Windows Files step, I've tried installing with the DVD drive in the mix, and with it unplugged. I get the same Type 1 failure I've described either way. The only difference I noticed with the DVD out of the mix was that both my initial BIOS splash screen and the Windows install were at much higher resolution. Other than the difference in the display resolution there was no other effect I observed.

I finally said F-it and pulled out the M.2 NVMe and tried the install with that drive not in the mix. I did this with the DVD also not in the mix, so the only drives the computer saw at all were Disk 0 (240GB SSD) and Disk 1 (16GB Windows Install USB). I got the same result, the dreaded "Windows could not prepare the computer to boot into the next phase" error as soon as it hit the Finishing Up step.

Clearly, there is some other issue that's preventing this installation, but I don't know what it may be. Using Rufus is not an option for me. I don't have a Windows machine, so can't run that SW.
 
You have to go back and back, to the default computer you bought.

Try with loading defaults on BIOS.

If not, do a Reset CMOS on bios.

(Save your actual configuration, just in case for the opencore etc)
 
Hmmm... I may have found a clue relating to the USB.

Whenever I have the Windows USB inserted and go to the BIOS selector for which disk to boot (F12) I see two partitions for the USB. Selecting P1 on the USB won't boot the system at all, but selecting P2 on the USB does, so that's what I've been doing. When I look at the USB in macOS I found that the USB is GUID Partition Map, and it has an EFI partition (disk5s1) that was empty, and then there is a WIN11 FAT32 partition (disk5s2). Here's what's on the WIN11 partition

% ls -lrt
total 6160
-rwxrwxrwx 1 username staff 95712 Sep 24 23:44 setup.exe
-rwxrwxrwx 1 username staff 2556264 Sep 24 23:44 bootmgr.efi
-rwxrwxrwx 1 username staff 442062 Sep 24 23:44 bootmgr
-rwxrwxrwx 1 username staff 128 Sep 24 23:44 autorun.inf
drwxrwxrwx 1 username staff 8192 Sep 24 23:46 efi
drwxrwxrwx 1 username staff 8192 Sep 24 23:46 boot
drwxrwxrwx 1 username staff 8192 Sep 24 23:46 support
drwxrwxrwx 1 username staff 16384 Oct 30 11:28 sources

The "efi" folder appears to have Windows stuff in it as it's got two folders: boot and microsoft. The boot folder has just bootx64.efi in it, but the microsoft folder has another boot folder within it, and within that, there is this.

% ls -lrt
total 13919
-rwxrwxrwx 1 username staff 10352 Sep 24 23:44 winsipolicy.p7b
-rwxrwxrwx 1 username staff 2337632 Sep 24 23:44 memtest.efi
-rwxrwxrwx 1 username staff 1474560 Sep 24 23:44 efisys_noprompt.bin
-rwxrwxrwx 1 username staff 1474560 Sep 24 23:44 efisys.bin
-rwxrwxrwx 1 username staff 904552 Sep 24 23:44 cdboot_noprompt.efi
-rwxrwxrwx 1 username staff 904560 Sep 24 23:44 cdboot.efi
-rwxrwxrwx 1 username staff 16384 Sep 24 23:44 bcd
drwxrwxrwx 1 username staff 512 Nov 4 08:39 cipolicies
drwxrwxrwx 1 username staff 512 Nov 4 08:39 resources
drwxrwxrwx 1 username staff 2048 Nov 4 08:39 fonts

Should I copy the "efi" folder from WIN11 to the EFI partition? Would I need anything else in there with it like bootmgr or bootmgr.efi?

Should I remake my USB in some other way so that it has only one partition?

I know how to get to the UEFI shell from the OC picker screen, but not how to get there any other way; so I believe the only way for me to get there is to have the NVMe drive installed unless I copy the NVMe's EFI contents to the SSD's EFI partition (I've done that before and been able to boot to macOS on the NVMe).
 
If there is a "Microsoft" and "Boot" in your EFI then it should be a bootable stick. There are two versions of the Windows installer - one for UEFI and one for legacy. If CSM is enabled in BIOS you will see two Windows boot entries, one for each - P2 and WBM.

If there is no other OS or data on the destination drive I would let the Windows installer do all the work. If the installer tells you the destination is not suitable then erase it as MBR - FAT32/NTFS and that should make it happy.
 
Status
Not open for further replies.
Back
Top