CREATE_DISK(1)

NAME
create_disk - create disk container file for ti_w11

SYNOPSIS
create_disk --typ=typ [--ini=pat] [--bad] [--boot] FILE
create_disk --help

DESCRIPTION
Creates a disk container file FILE with the proper size for a disk of type typ.

OPTIONS

--typ=typ
    determines disk type, must be specified. The list of supported disk types can be obtained with the --help option.

--ini=pat
    determines whether the container file will be initialized with a specific data pattern. Note that the --bad and --boot options will overwrite the last track or the first sector(s) respectively. The default without --ini is to create a container with all zero data. It is implemented by writing a single zero byte after positioning with lseek(2) to the desired end. This creates a file with 'holes' and defers the actual allocation of disk space to the point when sectors are written. Allowed values for pat are

    zero
        creates a disk with all sectors zero'ed. In this case, zero's are explicitly written. The explicit allocation of disk space is the main effect of this option.

    ones
        creates a disk with all data bytes set to 0xff.

    dead
        creates a disk with an alternating 0xdead 0xbeaf pattern. Can be helpful to diagnose whether an operating system accesses uninitialized parts of a disk.

    test
        creates a disk with a unique test pattern in each sector. The whole disk is initialized with groups of 8 16bit words (in PDP-11 little-endian) with
            0:  absolute disk byte address, lower word
            1:  absolute disk byte address, upper word
            2:  current cylinder number (0 based)
            3:  current track/head number (0 based)
            4:  current sector number (0 based)
            5:  number of cylinders for disk type
            6:  number of tracks/heads for disk type
            7:  number of sectors for disk type

        A hexdump(1) of an RP06 disk image initialized with --ini=test will look like
               0000000 0000 0000 0000 0000 0000 032f 0013 0016
               0000010 0010 0000 0000 0000 0000 032f 0013 0016
               ...
               00001f0 01f0 0000 0000 0000 0000 032f 0013 0016
               0000200 0200 0000 0000 0000 0001 032f 0013 0016
               ...
               a657be0 7be0 0a65 032e 0012 0015 032f 0013 0016
               a657bf0 7bf0 0a65 032e 0012 0015 032f 0013 0016

--bad
    creates a DEC standard 044 compliant bad block table on the last track of the disk container file.

--boot
    creates a PDP-11 dummy boot block. When such a disk is attached and booted with ti_w11(1) or a simh pdp11 a message like
          ++======================================++
          || This is not a hardware bootable disk ||
          ++======================================++
          Disk image created with 'create_disk --typ=RK05':
            number of cylinders:        203
            tracks per cylinder:          2
            sectors per track:           12
            block size:                 512
            total number of sectors:   4872
            capacity in kByte:         2436
          CPU WILL HALT
    will be printed on the system console and the CPU HALTed.

--help
    print full help, with list --typ and --ini options.

EXIT STATUS
If the file FILE can not be created an exit status 1 is returned.

EXAMPLES

create_disk -typ=rk05 rk05.dsk
    This will create a zero'ed disk contained sized for an RK05 disk. In most cases, it is sufficient to create such plain zero'ed disk images.

create_disk -typ=rl02 -bad rl02.dsk
    Creates an RL02-sized disk with a 'factory bad block table'. When using RLxx, RPxx, or RMxx type disks, especially in conjunction with DEC operating systems, it is advisable to create disks with --bad.

create_disk -typ=rk05 -ini=test rk05_test.dsk
    Creates an RK05-sized disk with a test pattern.

SEE ALSO
ti_w11(1)

AUTHOR
Walter F.J. Mueller <W.F.J.Mueller@gsi.de>