mu/tools/image-data

13 lines
323 B
Plaintext
Raw Permalink Normal View History

2021-08-10 15:59:00 +00:00
#!/bin/sh
# Create a disk image containing some (text) data.
if [ $# -eq 0 ]
then
2021-10-10 15:35:59 +00:00
echo "Fill disk of some capacity (in ~1 MB units) from stdin"
2021-08-10 15:59:00 +00:00
echo "usage: image-data capacity"
exit 1
fi
2021-10-10 15:35:59 +00:00
dd if=/dev/zero of=data.img count=$(($1*2016)) # 32 tracks * 63 sectors/track of 512-byte sectors
2021-08-10 15:59:00 +00:00
dd of=data.img conv=notrunc