0

I have a dual-boot of Win10 and Ubuntu 20.04.

Problem In virtualbox, I get an error stating that it "can't find any bootable medium", every time I try to boot a vdi that I created from an image of my linux partition.

How I created the .VDI
For testing purposes,
1.) I booted my host machine from a Ubuntu LiveUSB,
2.) and used the disk utility to create an image of my linux partition.
3.) Then I used VBoxManage convertdd source_file.img destination_file file.vdi to convert the .img into a virtualbox .vdi format.
4.) From there I booted into my host and tried to boot the new vdi in virtualbox, getting the aforementioned error (no bootable medium)
5.) I added a ubuntu20.04 LiveUSB .iso file to virtual machine, booted into that and I was then able to successfully mount the newly created .vdi and explore the files.

6.) I noticed that the home folder was completely empty, which makes sense...

  • this is because I moved my home folder to a separate partition on my host machine.
    Therefore, I rsync'ed a copy of my home folder settings and key files into the guest home folder.

7.)I figured that UUID in /etc/fstab might be wrong, so I used sudo blkid to confirm the UUID and /etc/ftsab are correct

8.) After I verified home directory files and /etc/fstab were correct... I installed boot-repair and very oddly... it did nothing... it behaved as if grub didn't exist at all, not even presenting an option to "repair" only presenting an "option" to quit.

Any tips?

  • If you only cloned a partition you have probably left the grub installation elsewhere on the physical computer so there is nothing to boot. What mode are you using (legacy or UEFI)? Your physical computer may be UEFI, Virtualbox defaults to legacy. If it’s legacy you probably just need to install grub with a chroot on the Virtualbox guest – PonJar Jan 14 '21 at 09:37
  • @PonJar. thx for the follow up. My computer is UEFI. So how do I get the .vdi to boot? – nightwatch Jan 14 '21 at 09:44
  • I haven't done this myself so I cannot give you precise instructions. Virtualbox machines are usually set to boot in legacy mode but you can change that to UEFI in the settings. If you go down the UEFI route it you may just need to clone the EFI partition on your physical machine, make a .vdi of it and add it to the VM. Not sure what issues you will get there. Alternatively go down the legacy route and just try to install grub as per this link https://askubuntu.com/questions/1262733/install-grub-on-mounted-filesystem? This may not work as your .vdi started as UEFI. Good Luck! – PonJar Jan 14 '21 at 10:42

0 Answers0