5ISO9660/ODS-2 dual format CD utilities-.4

@

ISO9660/ODS-2 dual format CD utilities

4






Brief History

NODSISO was originally designed to be a toolset for generating an ISO-9660 fileGsystem onto a properly prestaged ods-2 volume. The prestaging operationCwas labor intensive, and creating the iso9660 structures required aJsignificant programming effort, and was never fully completed. Some usefulItools were written in the process though. Two of those tools, with slightFmodifications, combined with a better method of generating the iso9660Hstructures, has led to a workable solution for creating dual-format CD'swith co-mapped files.

EThe "better method" for generating the iso9660 structures came from aFvery useful set of instructionsGpublished by Brian Schenkenberger which used mkisofs to generate anCiso9660 container file and overlay it onto an ods-2 container, thenGinitialize the ods-2 container to leave the iso9660 overlay badblock'd.<This concept eliminated the need to pre-stage the ods-2 disk2and write code to generate the iso9660 structures.

HThis utility builds on the mkisofs overlay concept, adding the following features:

    6
  1. The resulting disk has no badblocks recorded
  2. O
  3. The resulting disk image is aligned to expected CD "geometry" resulting inH a final ods-2 image that will analyze clean after burn onto a CD-R., *
  4. H
  5. The iso container is precisely aligned on cluster boundaries in the; ods-2 container (required for co-mapping to work)
  6. C
  7. Co-mapping the file bodies in the iso9660 image to ods-2 (i.e.G the file systems share diskspace instead of behaving as two discrete partitions)
  8. '
  9. Fully automates the procedure
  10. 


 A * Except an 8-block overburn problem (not related to odsiso)



NThis procedure is still in an early phase of development. It seems to work ok,Nbut it could stand some improvements. ContributionsFare welcomed. Advance communication would also be appreciated to avoidduplication of effort.






Contents:

LThe toolset contains two C programs, a command procedure, this document, anda few other odds & ends.



Terms:

.The following terms are used in this document:
F
Isoroot - A directory used to contain the "tree" of filesM that will be used to create the ISO9660 portion of the final CD-R.
F
Container File - The file used to contain an image of theI dual-format filesystem during construction, and for final burn onto CD-R
I
[ISOROOT] - A directory in the container file which maps theH ISO9660 files on the dual-format CD-R immediately after prestaging is completed.
H
Prestaging - The process performed by ODSISO. This consistsJ of reading the isoroot, generating an ISO9660 image file, overlayingO the image file onto the container file, initializing the ODS-2 structuresI on the container file, then finally co-mapping the file bodies into [ISOROOT].
I
Image file - The temporary file generated from using mkisofsG (done automatically in ODSISO). This is a pure ISO9660 filesystemJ image. It will be merged into the container file for co-mapping from ODS-2.





Prerequisites:



Caveats:



Using odsiso:

>
   $ @odsiso lda23 $2$dka200:[disks]ods-image.dsk label -0             dev:[dir.isoroot] isoscratch iso-rc5     p1 = LD device used to map the container file to@     p2 = LD container file that the CD image will be built onto     p3 = VMS volume label=     p4 = isoroot directory - the source for the mkisofs root@     p5 = a scratch directory to hold the iso image & temp files>     p6 = the .mkisofsrc file to use to generate the iso image


Notes:



Example iso-rc file:


  APPI=mkisofs v1.05.vms7Y  PUBL=Joes Burgers Inc., 200 E. Nowhere Rd, Suite 5, Somewhere, Fx, 21212, (212)212-2121Y  PREP=Joes Burgers Inc., 200 E. Nowhere Rd, Suite 5, Somewhere, Fx, 21212, (212)212-2121  COPY=Joes Burgers Inc  VOLI=TESTVOL1


Download




Outline of Usage

IHere is a outline of the general steps needed to do a complete generation+of a container file ready for burn to CD-R:
    3
  1. Acquire and install the tools listed above
  2. =
  3. Unpack ODSISO.COM and tools into their own directory
  4. I
  5. Edit the ODSISO.COM procedure and provide the appropriate informationI in the environment section, paying particular attention to 'isotools' and 'filecld'.S
           $ isotools = "dev:[dir.dir2]"      !dev:[dir.dir2] contains mkisofs.exeM       $ filecld  = "dev:[dir1]file.cld"  !dev:[dir1] contains file.cld
  6. G
  7. Create a directory to contain all files that will be in the ISO9660H filesystem on the final disk. (This is called isoroot in this document.)
  8. F
  9. Load all files for the ISO9660 filesystem into the isoroot. PleaseE take special care that all of these files are either fixed recordJ format or stream_lf format. The mkisofs tool will insist on this.
  10. L
  11. Use DIR/SIZE=ALL/GRAND of the isoroot directory [...] to get an estimateI of the amount of space needed for the ISO9660 filesystem. Add to this number the amount ofM space that will be needed by any additional files that will be accessible& only to the ODS-2 filesystem.
  12. G
  13. Create a 'scratch' directory in a location large enough to hold the< ISO9660 filesystem image as it is built by mkisofs.
  14. H
  15. Create a container file large enough to hold the grand total of fileF space, plus a small fudge factor (at least 1024 blocks). (Refer toE $ MCR SYSGEN HELP CREATE for info on how to create an appropriate container file).
  16. H
  17. Select an LD number to use to map the container file. Do NOT map theF container file at this time. This LD device will be used by ODSISO0 to prestage the dual-format disk image.
  18. L
  19. Use the ODSISO command. This will create the ISO9660 image, copy it ontoL the container file, and cross-map the ISO9660 files onto the ODS-2 imageG in the container file. Now might be a good time to sprinkle someI powdered tongue of newt on the keyboard, hop three times on your leftE foot, then mumble something about why you ever set out to do this anyway.
  20. K
  21. The LD device selected above now contains a directory called [ISOROOT].G This directory should look identical to the isoroot dir used as theL source of the ISO9660 filesystem. You should rename files from [ISOROOT]H to wherever you want them in the ODS-2 filesystem. (Renaming doesn'tL move the file bodies... it just changes what ODS-2 thinks they're calledH and what directories they live in - they still co-map their original ISO9660 files).
  22. I
  23. Copy in any files that are to appear only in the ODS-2 portion of theH disk. An example of this might be a VMSINSTALlable kit directory and6 contents - most peecees wouldn't have a clue.
  24. E
  25. Delete any 'co-mapped' ODS-2 files that you do NOT want to appearE on the final ODS image. Examples of these might be such things asB the ISOROOT.DIR itself, and maybe an autorun.inf file that you9 thoughtfully put on the drive for the benefit of some unsuspecting willieware box.? Note: DO NOT WRITE TO THE DISK AFTER THIS STEP!
  26. I
  27. DISMOUNT, then MOUNT/NOWRITE the LD device & verify it's contentsJ both ODS-2 AND ISO9660 (Use MOUNT/MED=CD/NOWRITE to use ISO9660).
  28. E
  29. When finished, dismount, disconnect LD device, and burn container4 file onto CD-R using your favorite toaster.
  30. 



Under the hood

KHere is a basic outline of what ODSISO is doing to generate the dual-formatcontainer file:
    @
  1. Force ldan container to a known state as best we can< (i.e. dismount if mounted, deassign container if needed)
  2. Q
  3. Scan the proposed isoroot directory for unsupported file types & lengths2
    Error if lengthof(filename+extension) > 320
    Error if filetype not FIXED or Stream_LF
  4. &
  5. Generate iso image & log file
  6. ,
  7. Search log file for mapping information8
    Read, reformat, and validate mapping information(
    Reverse-sort mapping information
  8. S
  9. make sure ods container looks big enough for iso container (1024 extra blocks)
  10. '
  11. copy /overlay 'targimg' 'odsimage'
  12. H
  13. iso_alloc = sizeof(iso-container) - 64
    note: this is the*SIZE and NOT the ALLOCATION)
  14. I
  15. align ODS-2 container block usage to multiple of 24 blocks so that aM final CD image will not give bad storage control block errors on analyze
  16. L
  17. init/sys/bad=(64:'iso_alloc')/clust=4/noverify ldan label
  18. #
  19. Mount ldan label+
    set volume ldan /nohighwater
  20. 4
  21. Generate isovol.sys in root of the virtual disk
    This is done by:
    *
    creating empty isovol.sys
    &
    truncating badblk.sys
    H
    allocating the original badblock'd blocks to isovol.sys
    
    
  22. 
  23. Foreach(file_in_map)
    U
    generate ods-2 file corresponding to the iso container logical blocks:
    
    A
    Create an empty file in ldan:[isoroot...]
    ?
    Release the appropriate blocks from isovol.sys
    M
    Allocate the released blocks to the newly created empty file
    
    Z
    Use FILE to copy file attributes from the original file into the new header
    
    
  24. 
4

<odsiso@tditx.com
99.05.063
© Copyright 1999, TECSys Development, Inc.