On my computer, I had multiple partitions and operating systems.
/dev/sda1 -> recovery
/dev/sda2 -> linux
/dev/sda3 -> swap
/dev/sda4 -> windows
I made an image backup of the linux partition:
pv < /dev/sda2 > linux-backup.img
Then, I formatted everything from the laptop.
How can I use this image in a new VirtualBox machine?
I am only interested in the linux partition and want to use it inside a virtual machine for some time. I tried converting the image:
VBoxManage convertfromraw --format VDI linux-backup.img linux.vdi
... but this gives me a whole disk containing the data (/dev/sda
inside the VM), not a partition (I guess I would need the data inside a /dev/sda1
).
And the other problem is, that this is not bootable.
Does anyone have an idea?
UPDATE: updated the question to point out, that I will not use the partition simultaneously from the computer and from the VM! I just want to use it for some time in the VM.