Skip to main content
The 2024 Developer Survey results are live! See the results
replaced http://superuser.com/ with https://superuser.com/
Source Link

As MattMatt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin windows.vdi $Bytes

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.

As Matt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin windows.vdi $Bytes

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.

As Matt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin windows.vdi $Bytes

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.

Update command for correct argument order.
Source Link
Daniel H
  • 1.6k
  • 1
  • 13
  • 23

As Matt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin $Bytes windows.vdi $Bytes

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.

As Matt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin $Bytes windows.vdi

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.

As Matt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin windows.vdi $Bytes

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.

Source Link
Daniel H
  • 1.6k
  • 1
  • 13
  • 23

As Matt said, you use the VBoxManage command, and that Windows might not like it. However, there's a faster way that doesn't use up as much disk space. You can use stdin as the input for the convertraw command (which, if you read Matt's answer, is the same as the convertdd command:

# dd if=$WinDevice | VBoxManage convertfromraw stdin $Bytes windows.vdi

Where $WinDevice is the device of the windows partition (such as /dev/sda2), and $Bytes is the exact number of bytes (for example, 1488581554176; you can determine this from within Windows by right-clicking on the C: drive in My Computer and hitting "Properties", it's the Capacity: line underneath the Used and Free space lines and above the pie chart).

Note that I have not tried this myself, and that I believe you might need to use /dev/sda instead of /dev/sda2, assuming you won't be writing to the drive that Windows is on. That way, you capture the partition table and bootloader.