I created a backup from /dev/sda1 and /dev/sda4 partitions using dd. but i did not create a backup from /dev/sda2 and /dev/sda3. How can I convert these 2 backup files from /dev/sda1 and /dev/sda4 namely sda1.img and sda4.img to virtualbox disk and boot the system?
Asked
Active
Viewed 9,206 times
1 Answers
1
1. Test the disc image mounts sucessfully
mount -t loop <disc image.img> <mountpoint>
cd <mountpoint>
ls # should show disc image contents as expected
2. Create a VMDK image referencing your disc image
VBoxManage internalcommands createrawvmdk -filename <vmdk filename>.vmdk -rawdisk <disc image.img>
3. Create a VirtualBox machine
Select the VMDK file, created in the previous step, as your disc image.
Alternatives
Other virtualisation technologies are available. For example, you could also use qemu for this task:
https://unix.stackexchange.com/questions/276480/booting-a-raw-disk-image-in-qemu
moo
- 353