I would like to save my Linux system (including packages, files, and configuration) and export it to another laptop in the form of a virtual machine with VirtualBox.
I have been able to create a file of the correct format (.vdi) with these commands:
sudo dd if=/dev/sdb of=/media/HDD/disk.img
VBoxManage convertdd disk.img disk.vdi --format VDI
I was also able to achieve this through this line:
sudo dd if=DRIVE | VBoxManage convertfromraw stdin FILENAME.vdi BYTES
However, when I open the generated VDI file as an existing hard disk in VirtualBox, the same error is displayed each time I try to boot: no bootable medium found.
I also tried another solution with the CloneZilla tool running on a live USB key; I was able to generate an image of my system and to store it on an external hard drive.
That image is not recognized when I proceed to the restoration on my virtual machine. The USB device containing the image does not appear inside the list of the partitions.
Here my /dev/sdb output:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 24.0 GB, 24015495168 bytes
255 heads, 63 sectors/track, 2919 cylinders, total 46905264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7ef857ad
Device Boot Start End Blocks Id System
/dev/sdb1 1 46905263 23452631+ ee GPT
And UUID here /boot/grub/grub.cfg matches with /etc/fstab in /dev/sdb1.