Page 1 of 1

dd + VirtualBox

Posted: 11. Dec 2008, 17:09
by bporcaro
I have create the file dd of installation kubuntu 7.10

sudo dd if=/dev/sda3 of=/media/disk/kubuntu.dd

i have compare

sudo cmp -l /dev/sda3 /media/disk/kubuntu.dd
and
sudo md5sum /dev/sda3
sudo md5sum /media/disk/kubuntu.dd

After, i have converted kubuntu.dd in kubuntu.vdi

VBoxManage convertdd /media/ACERDATA/kubuntu.dd Scrivania/kubuntu.vdi
but this .vdi can't start
after i have can compact image .vdi

this is output:

VBoxManage convertdd /media/ACERDATA/kubuntu.dd Scrivania/kubuntu.vdi
VirtualBox Command Line Management Interface Version 2.0.6
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Converting VDI: from DD image file="/media/ACERDATA/kubuntu.dd" to file="Scrivania/kubuntu.vdi"...
Creating dynamic image with size 6818757120 bytes (6503MB)...
dino@dino-laptop:~$ VBoxManage modifyvdi Scrivania/kubuntu.vdi compact
VirtualBox Command Line Management Interface Version 2.0.6
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling virtualBox->FindVirtualDiskImage(filepath, vdi.asOutParam()) at line 3354!
[!] Primary RC = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Full error info present: true , basic error info present: true
[!] Result Code = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Text = Could not find a registered VDI hard disk with the file path '/home/dino/.VirtualBox/Scrivania/kubuntu.vdi'
[!] Component = VirtualBox, Interface: IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
[!] Callee = IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
error: Hard disk image not found

Help me.

Sorry from my english.

Posted: 11. Dec 2008, 20:56
by TerryE
Two issues: first you are copying a partition to a HDD image. You should copy a partition to a partition or an image to an image, this is because the grub loader phase 1 bootstrap sits in the MBR which is outside the partition.

Second, what was your working directory when you did the dd? The VBoxManage modifyvdi <name> compact assumes a root of $HOME/.VirtualBox if you use a relative path file name. Use an absolute path to avoid this.