about summary refs log blame commit diff stats
path: root/tools/image-data
blob: e73b6d7dab0aa77b267dc3ad32aa2ea70514435a (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                                                  
                                                               



                                   
                                                                                                  
                           
#!/bin/sh
# Create a disk image containing some (text) data.

if [ $# -eq 0 ]
then
  echo "Fill disk of some capacity (in ~1 MB units) from stdin"
  echo "usage: image-data capacity"
  exit 1
fi

dd if=/dev/zero of=data.img count=$(($1*2016))  # 32 tracks * 63 sectors/track of 512-byte sectors
dd of=data.img conv=notrunc