about summary refs log tree commit diff stats
path: root/tools/image-data
diff options
context:
space:
mode:
Diffstat (limited to 'tools/image-data')
-rwxr-xr-xtools/image-data12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/image-data b/tools/image-data
new file mode 100755
index 00000000..fe46e310
--- /dev/null
+++ b/tools/image-data
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Create a disk image containing some (text) data.
+
+if [ $# -eq 0 ]
+then
+  echo "Fill disk of some capacity (in MB) from stdin"
+  echo "usage: image-data capacity"
+  exit 1
+fi
+
+dd if=/dev/zero of=data.img count=$(($1*2016))  # 32 * 63 sectors/track
+dd of=data.img conv=notrunc