about summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-10 08:59:00 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-10 08:59:00 -0700
commit350a255134c7d7efb6d6c456c8d50bf15f96f26d (patch)
treef4d1155dd658234d73c4ee683717100f13f98aed /tools
parentb0a83af0e56a3f1d32059554c06734fff58bebc5 (diff)
downloadmu-350a255134c7d7efb6d6c456c8d50bf15f96f26d.tar.gz
new tool: creating a data disk
Diffstat (limited to 'tools')
-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