0

I have a laptop, originally installed with Windows 10, and it has a second internal disk. I've installed Ubuntu 18.04.2 on that disk. When the computer starts up, Grub gives me the choices I need for dual booting. That part all seems to work fine.

What I'd like to be able to do is to boot from that same disk in a virtualized environment, ideally VirtualBox or Hyper-V (because no cost to me). At the moment, I've been trying to get this going in Hyper-V, and have a VM defined with access to that physical disk. But it won't boot. This is unsurprising as the disk wasn't setup to boot.

Is there a way, from within my Linux environment perhaps, to install GRUB to that disk so that it would be bootable? I may be naive here, but I think that's all I need, or at least the next major step.

This Linux disk has 2 partitions on it -- one is the large (223.55 GiB) Linux partition (ext4), but before it is a small (15.98 MiB) Microsoft reserved partition (unknown fs), that I believe I can delete, because I have no need for Windows to access this disk.

Also note that I don't want to mess up the original HD in the laptop. I want to continue to be able to dual-boot, but would like to be able to run Linux virtualized because most of the time that will be sufficient for my needs.

Thanks for any help!

3
  • Might be simpler to undo the dual boot, create a VM with the second disk as raw disk and install Ubuntu to it. Even simpler would be to install Ubuntu from the Microsoft Store and mount the other disk in bash.
    – harrymc
    Commented Jul 2, 2019 at 20:00
  • I think there are lots of simpler ways to get somewhere similar; but what I want is to be able to boot the same system both ways.
    – tastewar
    Commented Jul 3, 2019 at 11:04
  • Since we are into simplicity, you will need to perhaps reduce the Linux partition, re-install Linux+grub through the VM, then re-parameter the grub Linux boot from the first disk (will not need to be required if partition order is not changed).
    – harrymc
    Commented Jul 3, 2019 at 12:44

0

You must log in to answer this question.

Browse other questions tagged .