ISO9660/ODS-2 dual format CD utilities ------------------------------------------------------------------------ ALERT! /**/ /*In the course of testing some new code I will shortly publish here, I have found a serious problem with this procedure as-published.... The process used to initialize the ODS-2 container "around" the iso image will only tolerate an iso image of 65596 or fewer blocks in size. Larger sizes guarantee data corruption of the iso portion of the dual-format container.*/ /*The patched procedure is: odsiso_fix1.com. This is not as thoroughly tested as I would like, but it is soon to be replaced anyway. */ ------------------------------------------------------------------------ Brief History ODSISO was originally designed to be a toolset for generating an ISO-9660 file system onto a properly prestaged ods-2 volume. The prestaging operation was labor intensive, and creating the iso9660 structures required a significant programming effort, and was never fully completed. Some useful tools were written in the process though. Two of those tools, with slight modifications, combined with a better method of generating the iso9660 structures, has led to a workable solution for creating dual-format CD's with co-mapped files. The "better method" for generating the iso9660 structures came from a very useful set of instructions published by Brian Schenkenberger which used mkisofs to generate an iso9660 container file and overlay it onto an ods-2 container, then initialize the ods-2 container to leave the iso9660 overlay badblock'd. This concept eliminated the need to pre-stage the ods-2 disk and write code to generate the iso9660 structures. This utility builds on the mkisofs overlay concept, adding the following features: 1. The resulting disk has no badblocks recorded 2. The resulting disk image is aligned to expected CD "geometry" resulting in a final ods-2 image that will analyze clean after burn onto a CD-R. *** <8block.html> 3. The iso container is precisely aligned on cluster boundaries in the ods-2 container (required for co-mapping to work) 4. Co-mapping the file bodies in the iso9660 image to ods-2 (i.e. the file systems /share/ diskspace instead of behaving as two discrete partitions) 5. Fully automates the procedure ** Except an 8-block overburn problem (not related to odsiso) * <8block.html> This procedure is still in an early phase of development. It seems to work ok, but it could stand some improvements*** . Contributions are welcomed. Advance communication would also be appreciated to avoid duplication of effort. *** Updated 00.01.23! New features Soon! ------------------------------------------------------------------------ Contents: The toolset contains two C programs, a command procedure, this document, and a few other odds & ends. Terms: The following terms are used in this document: *Isoroot* - A directory used to contain the "tree" of files that will be used to create the ISO9660 portion of the final CD-R. *Container File* - The file used to contain an image of the dual-format filesystem during construction, and for final burn onto CD-R *[ISOROOT]* - A directory in the container file which maps the ISO9660 files on the dual-format CD-R immediately after prestaging is completed. *Prestaging* - The process performed by ODSISO. This consists of reading the isoroot, generating an ISO9660 image file, overlaying the image file onto the container file, initializing the ODS-2 structures on the container file, then finally co-mapping the file bodies into [ISOROOT]. *Image file* - The temporary file generated from using mkisofs (done automatically in ODSISO). This is a pure ISO9660 filesystem image. It will be merged into the container file for co-mapping from ODS-2. Prerequisites: * The mkisofs utility ftp://v36.chemie.uni-konstanz.de/mkisofs/mkisofs_vms.zip * Jur van der Burg's LD utilities ftp://ftp.montagar.com/freeware/ld062/ld062.zip * * * Joe Meadows FILE utility http://www.wku.edu/www/fileserv.html ftp://ftp.wku.edu/vms/fileserv/FILE.ZIP Caveats: * This procedure is ALPHA-Only at this point * The isoroot *MUST* be a directory spec, NOT a logical! Using odsiso: $ @odsiso lda23 $2$dka200:[disks]ods-image.dsk label - dev:[dir.isoroot] isoscratch iso-rc 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: * Refer to the LD documentation for instructions on setting up and using LD, container files, and devices. You will need to create the container file (I prefer to use SYSGEN for this). Normally you would then connect an LD unit to the container file, but in this case, ODSISO will do that for you. The container file should NOT be connected at the time odsiso is run. * Before using the odsiso command procedure, the isoroot directory needs to be created and populated in order to provide the source directory tree for mkisofs to use to create the iso9660 container file. * Files contained in the isoroot directory should be either fixed format or Stream-LF. Example iso-rc file: APPI=mkisofs v1.05.vms7 PUBL=Joes Burgers Inc., 200 E. Nowhere Rd, Suite 5, Somewhere, Fx, 21212, (212)212-2121 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 Here is a outline of the general steps needed to do a complete generation of a container file ready for burn to CD-R: 1. Acquire and install the tools listed above 2. Unpack ODSISO.COM and tools into their own directory 3. Edit the ODSISO.COM procedure and provide the appropriate information in the environment section, paying particular attention to 'isotools' and 'filecld'. $ isotools = "dev:[dir.dir2]" !dev:[dir.dir2] contains mkisofs.exe $ filecld = "dev:[dir1]file.cld" !dev:[dir1] contains file.cld 4. Create a directory to contain all files that will be in the ISO9660 filesystem on the final disk. (This is called /isoroot/ in this document.) 5. Load all files for the ISO9660 filesystem into the isoroot. Please take special care that all of these files are either fixed record format or stream_lf format. The mkisofs tool will insist on this. 6. Use DIR/SIZE=ALL/GRAND of the isoroot directory [...] to get an estimate of the amount of space needed for the ISO9660 filesystem. Add to this number the amount of space that will be needed by any additional files that will be accessible only to the ODS-2 filesystem. 7. Create a 'scratch' directory in a location large enough to hold the ISO9660 filesystem image as it is built by mkisofs. 8. Create a container file large enough to hold the grand total of file space, plus a small fudge factor (at least 1024 blocks). (Refer to $ MCR SYSGEN HELP CREATE for info on how to create an appropriate container file). 9. Select an LD number to use to map the container file. Do NOT map the container file at this time. This LD device will be used by ODSISO to prestage the dual-format disk image. 10. Use the ODSISO command. This will create the ISO9660 image, copy it onto the container file, and cross-map the ISO9660 files onto the ODS-2 image in the container file. /Now might be a good time to sprinkle some powdered tongue of newt on the keyboard, hop three times on your left foot, then mumble something about why you ever set out to do this anyway./ 11. The LD device selected above now contains a directory called [ISOROOT]. This directory should look identical to the isoroot dir used as the source of the ISO9660 filesystem. You should rename files from [ISOROOT] to wherever you want them in the ODS-2 filesystem. (Renaming doesn't move the file bodies... it just changes what ODS-2 thinks they're called and what directories they live in - they still co-map their original ISO9660 files). 12. Copy in any files that are to appear only in the ODS-2 portion of the disk. An example of this might be a VMSINSTALlable kit directory and contents - most peecees wouldn't have a clue. 13. Delete any 'co-mapped' ODS-2 files that you do NOT want to appear on the final ODS image. Examples of these might be such things as the ISOROOT.DIR itself, and maybe an autorun.inf file that you thoughtfully put on the drive for the benefit of some unsuspecting willieware box. *Note:* DO NOT WRITE TO THE DISK AFTER THIS STEP! 14. DISMOUNT, then MOUNT/NOWRITE the LD device & verify it's contents both ODS-2 AND ISO9660 (Use MOUNT/MED=CD/NOWRITE to use ISO9660). 15. When finished, dismount, disconnect LD device, and burn container file onto CD-R using your favorite toaster. ------------------------------------------------------------------------ Under the hood Here is a basic outline of what ODSISO is doing to generate the dual-format container file: 1. Force lda/n/ container to a known state as best we can (i.e. dismount if mounted, deassign container if needed) 2. Scan the proposed isoroot directory for unsupported file types & lengths Error if lengthof(filename+extension) > 32 Error if filetype not FIXED or Stream_LF 3. Generate iso image & log file 4. Search log file for mapping information Read, reformat, and validate mapping information Reverse-sort mapping information 5. make sure ods container looks big enough for iso container (1024 extra blocks) 6. copy /overlay 'targimg' 'odsimage' 7. iso_alloc = sizeof(iso-container) - 64 *note: *this is the /SIZE/ and NOT the /ALLOCATION/) 8. align ODS-2 container block usage to multiple of 24 blocks so that a final CD image will not give bad storage control block errors on analyze 9. init/sys/bad=(64:'iso_alloc')/clust=4/noverify lda/n/ /label/ 10. Mount lda/n/ /label/ set volume lda/n/ /nohighwater 11. Generate isovol.sys in root of the virtual disk This is done by: creating empty isovol.sys truncating badblk.sys allocating the original badblock'd blocks to isovol.sys 12. Foreach(file_in_map) generate ods-2 file corresponding to the iso container logical blocks: Create an empty file in lda/n/:[isoroot...] Release the appropriate blocks from isovol.sys Allocate the released blocks to the newly created empty file Use FILE to copy file attributes from the original file into the new header /odsiso@tditx.com / // ///99.05.06/ // //© Copyright 1999, TECSys Development, Inc.//