aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--CONTRIBUTORS1
-rwxr-xr-xtools/create-image.sh8
3 files changed, 9 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 5ede57a8e..8fb37048c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -36,3 +36,4 @@ Mellanox Technologies
Cody Holliday
JinWoo Lee
Andrew Turner
+Ethercflow
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 4b80b3bd3..c02d4ffe7 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -51,3 +51,4 @@ Mellanox Technologies
Cody Holliday
JinWoo Lee
Andrew Turner
+Ethercflow
diff --git a/tools/create-image.sh b/tools/create-image.sh
index 19c2019e3..9e931e99e 100755
--- a/tools/create-image.sh
+++ b/tools/create-image.sh
@@ -18,6 +18,7 @@ fi
# Variables affected by options
RELEASE=stretch
FEATURE=minimal
+SEEK=2047
PERF=false
# Display help function
@@ -26,6 +27,7 @@ display_help() {
echo
echo " -d, --distribution Set on which debian distribution to create"
echo " -f, --feature Check what packages to install in the image, options are minimal, full"
+ echo " -s, --size Image size (MB), default 2048 (2G)"
echo " -h, --help Display help message"
echo " -p, --add-perf Add perf support with this option enabled. Please set envrionment variable \$KERNEL at first"
echo
@@ -49,6 +51,10 @@ while true; do
FEATURE=$2
shift 2
;;
+ -s | --seek)
+ SEEK=$(($2 - 1))
+ shift 2
+ ;;
-p | --add-perf)
PERF=true
shift 1
@@ -113,7 +119,7 @@ if [ $PERF = "true" ]; then
fi
# Build a disk image
-dd if=/dev/zero of=$RELEASE.img bs=1M seek=2047 count=1
+dd if=/dev/zero of=$RELEASE.img bs=1M seek=$SEEK count=1
sudo mkfs.ext4 -F $RELEASE.img
sudo mkdir -p /mnt/$DIR
sudo mount -o loop $RELEASE.img /mnt/$DIR