Tools/udisetup - Switched back to udiprops_end instead of _size
[tpg/acess2.git] / Tools / BootFloppy / MakeDiskImage
1 #!/bin/bash
2 if [[ $# -ne 1 ]]; then
3         echo "Usage: $0 <image>" >&2
4         exit 1
5 fi
6 DIR=`dirname $0`
7 IMGNAME=$1
8 dd if=/dev/zero of="$IMGNAME" bs=512 count=2880
9 mformat -i "$IMGNAME" ::/ -f 1440 -v Acess
10 dd if=$DIR/stage1 bs=1 seek=0 count=3 "of=$IMGNAME" conv=notrunc
11 dd if=$DIR/stage1 bs=1 skip=$((0x3E)) seek=$((0x3E)) "of=$IMGNAME" conv=notrunc
12 mmd -i "$IMGNAME" ::/boot
13 mcopy $DIR/stage1 $DIR/stage2 -i "$IMGNAME" ::/boot/
14 /bin/echo -ne '\x23' | dd seek=$((0x44)) bs=1 count=1 "of=$IMGNAME" conv=notrunc
15 mcopy $DIR/menu.lst -i "$IMGNAME" ::/boot/

UCC git Repository :: git.ucc.asn.au