IMGCOPY.REX  v 1.0

A rexx script for making diskette image files.

INSTALLATION
------------

1  imgcopy.rex can be renamed to imgcopy.cmd, it must have an extention
2  imgcopy.ddt must be in the same directory.

COMMAND LINE USE
----------------

Instead of switches, this derives the required options from parsing a
virtual source name, the format being

   imgcopy maker999.ext filename

      maker  -> defines boot sector
         PCDOS   pcdos and ibmdos 3.3 to 7.0
         MSDOS   msdos 4.x to 6.22 and 7.0 beta
         MSWIN   Windows 95 98  (MSDOS 7.x)
         OSTWO   OS/2 2.x
         WINNT   WinNT 4.x
         BDOS-   DR-DOS 3.4
         DRDOS   DR-DOS, Novell DOS and OpenDOS
         RXDOS   Real Mode DOS
      999    ->  diskette size in 10k units, eg 016 is 0160k
         supported sizes  016 018 032 036 072 120 144 288
      .EXT   ->  image file mode
         .DSK    raw image
         .IMG    suitable from booting from "dos drive a:"

    filename
         /!  ->  debug information prints out data instead of making file.


FILLING the DISK
----------------

I use winimage's extract version 2.0 to fill diskettes.  This has been
included in this archive, as the licence allows this sort of redistribution.

MAKING clean bootdisks
----------------------

This can create any supported DOS boot disk under any operatng systems.
I have used this to create PCDOS and MSDOS boot disks under Windows NT.

1.  rexx imgcopy msdos144.dsk blank.dsk
    extract -i blank.dsk [files]

2.  loaddskf blank.dsk a:

EXAMPLES of Making disks.
-------------------------

1.  Boot images for OS/2.

MSDOS 4.0 to 6.22

   rexx imgcopy msdos016.img testfile.dat
   extract -i testfile.dat io.sys msdos.sys fsfilter.sys
   -> config.sys

PCDOS 4.0 to 7.0B (2000)

   rexx imgcopy pcdos016.img testfile.dat
   extract -i testfile.dat ibmbio.com ibmdos.com fsfilter.sys
   -> config.sys

Win9x  (95, 98, 98SE)

   echo ;sys > msdos.sys
   rexx imgcopy mswin036.img testfile.dat
   extract -i testfile.dat io.sys msdos.sys fsfilter.sys
   -> config.sys

Config.sys

Create a config.sys as per the OS/2 help on VMDISK

    device=a:\fsfilter.sys              must be first....
    device=d:\os2\mdos\vmouse.sys
    device=d:\os2\mdos\vemm.exe
    shell=d:\pcdos\61\command.com d:\pcdos\61 /p     <- can use 4dos!

Create an autoexec.bat as needed, eg
    call d:\pcdos\autoexec.bat 61

Inject the two files into the image:

    extract -i testfile.dat config.sys autoexec.bat

Create a desktop object that boots this image as 'dos from drive a:'

IMGCOPY.DDT format
------------------

This consists of 3 parts.

   1:  a header showing WENDY and a date
   2:  a disk description table with potentially 15 entries.
   3:  An array of boot sectors, each 256 bytes.

The program reads the boot sector from the .DDT file, according to the
selected 'maker'.  This is then modified to match the selected 'size'
from the entry in the disk description table.

For an image file, the order it is made is

   The eight byte leader, if an .img extension is specified.  This is
      defined by the 'size' parameter.
   The boot sector
   File allocation tables, agreeing in number and size to what is in
      the boot sector
   The balance of the disk, such as to make it to a full size.

ADDING A NEW DOS
----------------

To add a new dos, you need a boot-sector, such as the first 256 bytes of
a raw disk image.  For example, you might want freedos images.

   copy imgcopy.ddt imagecopy.bak
   copy imgcopy.bak+bootsect.dat imgcopy.ddt

Edit the section in imgcopy.rex to add the new DOS.

You're done.

LICENCE & COPYRIGHT
===================

imgcopy.rex (c) Wendy Krieger 1999
imgcopy.ddt (c) Wendy Krieger 1999, portions copyright by Microsoft, IBM,
   Digital Research, etc.

This software is being offered for free, with no warranty, implied or 
otherwise, or no fitness for purpose.  While I have tested it for known
problems, I can not guarrantee that the program is free from bugs.

The program can manufactures bootable disks of assorted DOSes.  The files
needed to make these disks are not included, and you need access to a
licenced version of that DOS where appropriate, and are governed by the
licences of the DOS you use to create the image.

Since I have provided the code in readable form, you are at liberty to
inspect the code before using it.

You may redistribute the program, as long as the files listed below are
not modified.

   imgcopy.rex
   imgcopy.txt
   imgcopy.ddt

This version may be superceded based on comments and bugs recieved.

   name:       Wendy Krieger
   email:      wykrieger@hotmail.com
   home page:  http://www.geocities.com/os2fan2/


Enjoy


Wendy
