I have a UEFI laptop with 2 HD successfully configured to dual boot Windows/Linux, using GRUB. The factory installed disk has Windows (+ GRUB), while the second is essentially Linux. (there is a small windows partition on it, prior to the ext4 main partition. For (way...) more details, here is a pastebin from boot-repair:


I would like to be able to boot this disk separately in a virtualized environment. I have a Hyper-V VM configured with this disk (sda) but it won't boot. I want to believe that the solution will be relatively simple, in that it ought to "only" involve installing a boot sector to that disk. Seems like there are GRUB related files on the disk (sda) already.

Can anyone help me?

  • You can passthrough the disk with qemu. By detachting it from the kernel(or make sure it doesn't get attached when booting?) and passing it to the virtual machine. – Dr_Bunsen Jul 3 at 12:25
  • the "simple" solution for me is to redo the installs of both windows and ubuntu but make sure no other drives than the target drives are plugged in when they install. sadly durring their install process both windows and ubuntu put things on other drives than their target drive except if no other drive is plugged in at the time. now your drives will be unbootable without each other. especially windows. had to learn this the hard way. now I have a windows and ubuntu each installed in isolation on a seperate drive that are both bootable when I move them between machines. – tatsu Jul 3 at 12:30
  • You can also leave an extra grub on the windows disk. it really doesn't hurt. it means you can have a setup where when you're booting windows, the grub from the ubuntu machine would l pass it off to the grub from the windows hard drive (it doesn't know and doesn't care what is on that system), then that grub would pass boot to windows boot loader : unix.stackexchange.com/questions/343632/… – tatsu Jul 3 at 12:34
  • @Dr_Bunsen- I get to the point in Hyper-V of it trying to boot from the linux disk, but it can't. I have unmounted it in Windows. – tastewar Jul 3 at 12:39
  • 1
    Thanks, oldfred. Based on this, I've disabled fast boot, but I guess we'll see what happens with the next Windows update. After doing a bit more reading, it seems I ought to be able to format that useless 16 MB partition as FAT12 or FAT16, and mark it as the esp partition. If I got to that point, is it a matter of either having boot-repair take some action(s), or calling some grub utility to get the right files to the right places? Or can I just copy them from my current boot disk? – tastewar Jul 4 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.