Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(925)

Unified Diff: src/scripts/image_to_virtualbox.sh

Issue 668215: VMWare [1/2]: Fix vmware image generation. (Closed)
Patch Set: fixes for review Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/scripts/image_to_vmware.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/image_to_virtualbox.sh
diff --git a/src/scripts/image_to_virtualbox.sh b/src/scripts/image_to_virtualbox.sh
index b49317b1e047db67f98c71b137b036041ba70811..f194ae93491cabd579dc3af9eb377937f39ae735 100755
--- a/src/scripts/image_to_virtualbox.sh
+++ b/src/scripts/image_to_virtualbox.sh
@@ -41,23 +41,5 @@ for EXTERNAL_tools in qemu-img VBoxManage; do
fi
done
-# Make two sparse files. One for an empty partition, another for
-# stateful partition.
-PART_SIZE=$(stat -c%s "${FLAGS_from}/rootfs.image")
-dd if=/dev/zero of="${FLAGS_from}/empty.image" bs=1 count=1 \
- seek=$(( $PART_SIZE - 1 ))
-dd if=/dev/zero of="${FLAGS_from}/state.image" bs=1 count=1 \
- seek=$(( $PART_SIZE - 1 ))
-mkfs.ext3 -F -L C-STATE "${FLAGS_from}/state.image"
-
-# Copy MBR and rootfs to output image
-qemu-img convert -f raw \
- "${FLAGS_from}/mbr.image" "${FLAGS_from}/state.image" \
- "${FLAGS_from}/empty.image" "${FLAGS_from}/rootfs.image" \
- -O raw "${TEMP_IMAGE}"
-VBoxManage convertdd "${TEMP_IMAGE}" "${FLAGS_to}"
-
-rm -f "${FLAGS_from}/empty.image" "${FLAGS_from}/state.image" "${TEMP_IMAGE}"
-
-echo "Done. Created VirtualBox image ${FLAGS_to}"
-
+$(dirname "$0")/image_to_vmware.sh --format=virtualbox --from=$FLAGS_from \
+ --to=$(dirname "$FLAGS_to") --vbox_disk=$(basename "$FLAGS_to")
« no previous file with comments | « no previous file | src/scripts/image_to_vmware.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698