Closed steve6375 closed 4 years ago
No. UEFI firmware uses "Device Path", no drive numbers.
P.S. I am booting from a USB hard disk (not sure if that is significant yet).
Does it work if you add drivemap -s hd0 hd1
here https://github.com/a1ive/grub2-filemanager/blob/df29f9fe139af7bfa7c327bf2d28865b97d5041e/boot/grubfm/distro/win.sh#L16
distro/win.sh seems to fix issue (tested in VM)
P.S. I am booting from a USB hard disk (not sure if that is significant yet).
"USB hard disk" -> do you mean 'external hard disk connected to USB port'?
Actually it is a Silverstone USB 3 adapter with an M.2 SATA PCB inside - but it is treated as an external USB hard disk.
tested 'drivemap -s hd0 hd1' on IdeaPad 300 and VM. Seems to work fine.
Now how to solve UEFI issue ??? MS must do something when they install from USB drive??
It works OK booting from a Removable USB drive, Windows Setup does not see the USB drive as a valid installation drive.
I think I have found a solution!
I used map -u in distro\win.sh
The loopback command seems to be required because map -u breaks the connection to loopback and also the connection to the XML file on the drive, but using the loopback command seems to fix both the boot.wim and the XML file issues.
I assume that using map -u is re-enumerating the drives but the USB drive is no longer flagged as the 'boot' drive and so Windows defaults to internal drive 0?
Can you test and confirm please? I will continue to test.
Seems to work so far... :-)
Why do you use map -u
?
To avoid the error in the first post.
It doesn't change drive order in firmware.
My theory was that the USB drive would no longer be flagged as the 'boot device' and so Windows will not try to install boot files to the USB drive. However, I now cannot reproduce the original problem!
I still cannot reproduce the original problem now, either in the VM which repeatedly failed before, or on the IdeaPad 300 which also repeatedly failed! Since the VM won't have changed, I can only conclude that there was something on the MBR partitions of the boot USB drive which Setup did not like. I did notice that when I install Windows, the date of the \EFI\Microsoft\boot\bcd file which I have on the 2nd FAT32 partition of my USB drive for booting to WinPE is getting changed (but the contents has not been changed). I will close this issue as I cannot now reproduce it.
Test on real system (not VM)
I think the problem is caused by Windows trying to modify BCD etc. on USB MBR drive 0 instead of the internal GPT hard disk. Partitions on internal hard disk are GPT and look OK.
Also, a similar issue occurs with MBR boot to ISO
I think adding drivemap -s hd0 hd1 may fix MBR install issue.
Is there a similar command for UEFI ?