At some moment in time I had 2 HDDs on same PC:
- Linux
- Windows
At boot time, when required I’d boot the right OS by hitting the boot menu key (in my case F12) and selecting the right HDD with the right OS; I know I could use a boot loader but just wanted to be able to remove without problems any of the HDDs in case that was required.
My main OS was Linux so when I needed to use Windows let’s say for ~30 mins I’d have to power Linux off and boot from Windows HDD.
As I had Oracle VirtualBox installed on Linux I decided to try to access the Windows from there. And these are the steps I made:
- Make the HDD accessible from my Linux host OS by running
sudo chmod o+rw /dev/nvme0n1
- Create a raw disk access VirtualBox image by running
VBoxManage internalcommands createrawvmdk -filename '/home/vitalie/VirtualBox_VMs/link_to_Windows_drive.vmdk' -rawdisk /dev/nvme0n1
.
After that I was able to add the image to Virtual Media Manager:
- Now I added this image to a virtual pc:
- At boot time I’d get an error so I had to boot from Windows installation CD and in command prompt run
Bootrec /fixMbr
- Next had another error and modified the settings of the virtual pc and
Enable EFI
inSettings > System > Motherboard
- And voilà
Resources used:
- https://ahelpme.com/software/virtualbox/add-a-raw-disk-to-a-virtualbox-virtual-machine/
- https://webistore.ru/prikladnoe-po/oshibka-verr_pdm_device_not_found-i-versii-usb-v-virtualbox/
- https://forums.virtualbox.org/viewtopic.php?f=6&t=85017
- https://pureinfotech.com/repair-master-boot-record-mbr-windows-10/
- https://superuser.com/questions/493858/virtualbox-fatal-int18-boot-failure
- https://www.virtualbox.org/manual/ch09.html#rawdisk
P.S. not I have a new problem – finding a way to work with nested virtualizations as Intel doesn’t allow for that but I want to use Android Studio AVDs on the Windows OS … currently getting this