aboutsummaryrefslogtreecommitdiffstats
path: root/freedom-maker/mk_virtualbox_image
diff options
context:
space:
mode:
Diffstat (limited to 'freedom-maker/mk_virtualbox_image')
-rwxr-xr-xfreedom-maker/mk_virtualbox_image31
1 files changed, 31 insertions, 0 deletions
diff --git a/freedom-maker/mk_virtualbox_image b/freedom-maker/mk_virtualbox_image
new file mode 100755
index 0000000..abdd730
--- /dev/null
+++ b/freedom-maker/mk_virtualbox_image
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Ensure git\VBoxManage is installed
+# Get vmdebootstrap code
+# Run vmdebootstrap script to create image
+# Convert image to vdi hard drive
+
+# don't tolerate errors.
+set -e
+
+basedir=`pwd`
+IMAGE=$1
+
+# Get vmdebootstrap code
+rm -rf vmdebootstrap
+git clone git://gitorious.org/~nickdaly/vmdebootstrap/nickdalys-vmdebootstrap.git
+
+# Run vmdebootstrap script to create image
+sudo ./vmdebootstrap/vmdebootstrap --log freedombox.log --log-level debug --image $IMAGE.img --hostname freedombox \
+ --size 1G --verbose --enable-dhcp --package ssh --package apache2 --package git --package mercurial \
+ --package build-essential --package checkinstall --package python-simplejson \
+ --mirror http://ftp.uk.debian.org/debian/ --package pandoc --package python-cheetah \
+ --package python-argparse \
+ --customize=$basedir/freedombox-customize --root-password=password1 --arch=i386
+
+# Convert image to vdi hard drive
+VBoxManage convertdd $IMAGE.img $IMAGE.vdi
+
+#mkdir testing
+#sudo mount -o loop,offset=1048576 freedombox.img testing/
+#sudo umount testing/