Page 1 of 1
grub rescue screen when booting windows 10 guest
Posted: 20. Nov 2019, 10:42
by Shmu26
I did a P2V conversion of a Windows 10 x64 EFI, by using a Macrium reflect system image.
I restored the macrium image onto a VDI file.
I enabled EFI boot in the VM settings.
When booting the guest, I get grub rescue screen.
I ran the Macrium Reflect boot repair, and it identified the Windows partition, but it didn't succeed in fixing the boot.
I then tried booting the guest from boot-repair-disk-64bit.iso, and it says it fixed the boot, but I still get to grub rescue screen.
If I mash the delete key I can get to some BIOS options, but I was not successful in finding the right incantation or incarnation in those options...
Important fact: the Linux partition is not in the VDI at all, because I did not image it. I don't want grub, I want Windows boot manager.
I attached a screenshot and the log.

- Screenshot.png (9.42 KiB) Viewed 5567 times
Raw Disk Access boots to UEFI Interactive Shell
Posted: 20. Nov 2019, 12:38
by Shmu26
So I am trying to boot my Windows 10 x64 EUFI installation in a virtual machine, as a raw disk.
I created my VMDK file, and set permissions, but it boots to UEFI Interactive Shell.
screenshot and log attached.

- Screenshot.png (26.72 KiB) Viewed 5571 times
Re: grub rescue screen when booting windows 10 guest
Posted: 20. Nov 2019, 17:09
by scottgus1
Shmu26 wrote:Important fact: the Linux partition is not in the VDI at all, because I did not image it. I don't want grub, I want Windows boot manager.
I think this is the important fact. As I have heard many times, one has to take the whole drive, not just the desired partitions.
A 'far out in left field' idea I would try: install a fresh Windows 10 in the guest, same Windows version as on the image, with EFI. Then just restore the actual Windows OS partition from the Macrium image over the Windows OS partition in the guest, not touching any of the other guest partitions.
No idea if this will work. There may be UUIDs to edit somewhere, etc. But it might work...
Re: grub rescue screen when booting windows 10 guest
Posted: 20. Nov 2019, 18:26
by Shmu26
scottgus1 wrote:Shmu26 wrote:Important fact: the Linux partition is not in the VDI at all, because I did not image it. I don't want grub, I want Windows boot manager.
I think this is the important fact. As I have heard many times, one has to take the whole drive, not just the desired partitions.
Makes sense, but last time I did P2V, I used the VMware converter, and when I did include the linux partition, I fell into the grub problem. When I tried again with the same converter, but without the linux partition, it worked. In fact, I am writing this message from that VM.
Re: Raw Disk Access boots to UEFI Interactive Shell
Posted: 20. Nov 2019, 18:30
by Shmu26
I suspect that this and my other woes are related to EFI boot. So I tried to switch my Windows installation to legacy boot, but I can't get it to boot up that way. Neither Windows recovery nor Macrium Reflect recovery can put Humpty Dumpty back together again, on legacy boot. So, regretfully, I returned to UFI boot.
Re: grub rescue screen when booting windows 10 guest
Posted: 21. Nov 2019, 15:02
by socratis
Please don't open two threads for the same issue... I merged them.
Re: grub rescue screen when booting windows 10 guest
Posted: 21. Nov 2019, 15:58
by Shmu26
@socratis -- but it is two different issues. One is a P2V conversion, the other is a raw access to a physical partition, and the errors are not the same.
Re: grub rescue screen when booting windows 10 guest
Posted: 22. Nov 2019, 15:06
by Shmu26
So the solution to the first issue -- that the virtual machine gets stuck at a grub screen after a P2V conversion -- is to clean the boot sector from all linux entries before performing the conversion.
Go into the BIOS settings of the physical machine and set everything -- all disks, storage devices etc -- to Compatibility mode/Legacy boot.
Reboot, and let it fail to load Windows, returning you to BIOS.
Now re-enable UEFI boot, restoring the settings you had before.
Voila, everything is erased from the boot sector except for Windows.
I used this method so I could do a Physical-to-Virtual (P2V) conversion of my hard disk, so I could use it in a virtual machine. If you don't clean the boot sector, the virtual machine might boot to grub, and it's hard to correct that.
The right way to do it is to convert a clean boot sector.