User Tools

Site Tools


converting_a_partition_image_to_a_disk_image

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
converting_a_partition_image_to_a_disk_image [2009/09/14 18:31] – created Michael Fennconverting_a_partition_image_to_a_disk_image [2011/09/10 17:37] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 First, create an empty disk (raw format) First, create an empty disk (raw format)
-<code>+<code bash>
 qemu-img create -f raw 10G starworker.img qemu-img create -f raw 10G starworker.img
 </code> </code>
Line 11: Line 11:
  
 Next we will need to mount the root partition of the VM offline.  To do this, we will need to use fdisk on the disk image to find the start of the root partition.   Next we will need to mount the root partition of the VM offline.  To do this, we will need to use fdisk on the disk image to find the start of the root partition.  
-<code>+<code bash>
 fdisk -lu starworker.img fdisk -lu starworker.img
 </code> </code>
Line 17: Line 17:
  
 Now mount the both the new and old filesystems and copy the files. Now mount the both the new and old filesystems and copy the files.
-<code> +<code bash
-mount -o loop starworker_partimg /mnt/looppart/+mount -o loop starworker_part.img /mnt/looppart/
 mount -o loop,offset=$(( $START * $UNITS )) starworker.img /mnt/loopdisk/ mount -o loop,offset=$(( $START * $UNITS )) starworker.img /mnt/loopdisk/
 cp -a /mnt/looppart/* /mnt/loopdisk cp -a /mnt/looppart/* /mnt/loopdisk
converting_a_partition_image_to_a_disk_image.txt · Last modified: 2011/09/10 17:37 by 127.0.0.1