Subject: Re: Creating ISO filesystems
To: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
From: Bob Nestor <rnestor@metronet.com>
List: port-mac68k
Date: 03/01/1999 19:51:42
Dr. Bill Studenmund <wrstuden@loki.stanford.edu> wrote:

>On Mon, 1 Mar 1999, Henry B. Hotz wrote:
>
>> How do you create and ISO (Rock Ridge) filesystem under MacBSD?
>
>/usr/pkgsrc/sysutils/mkisofs.
>
>> I'd like to create a dual Mac/ISO CD-ROM and Toast can handle disk images,
>> but it can't create Rock Ridge format.
>
>Look at /usr/pkgsrc/sysutils/mkhybrid. It's DESCR says:
>
>mkhybrid is a pre-mastering program to create iso9660 cd images with
>optional Rockridge, Joliet, or HFS support.  It is based on mkisofs
>and generates a binary image which can be written onto a block device
>such as a CDR drive.

Here's the script file I use to Master CDs on my NetBSD/mac68k system.  
The resulting image file is then transfered to anotehr Mac running Toast 
3.5.4 to burn the CD.

#!/bin/csh
# Takes one argument, the name of the target <arch> to build the CDs for.
# Whereever possible mkhybrid is used to master the CD, however if the
#  first letter of the <arch> name is capitalized then mkisofs will be
#  used instead.  The CDs are placed in /tmp/<arch>.  Three CDs are
#  created, one for USA/Canada, one for World and one containing all the
#  package sources.  The first two will contain the offical release
#  for the <arch> and anything in the <arch> directory as well as all
#  package source mods and package binaries appropiate to the <arch>.
# CDs created for the i386 port are bootable.
#########################################################################
# Setup the version to capture
#
set vers="NetBSD-1.3.3"
#
# Skip all prior Releases still on the Server
#
set rm_vers="-x ./NetBSD-1.3.1 -x ./NetBSD-1.3.2"
#
# Skip all pre-build binaries in the package source collection
#
set rm_pkgbin="-m 1.3 -m 1.3.1 -m 1.3.2 -m 1.3.3 -m 1.3F -m 1.3G -m 1.3I"
#
# Setup specials for the requested arch
#   If the arch name starts with a capital letter mkisofs is used to 
master
#     the CD; otherwise mkhybrid is used if possible.
#
if ("$1" == "") then
   echo "Usage: ./press_snaps <mac68k|i386|amiga> [usa|world|packages]"
   exit 1
endif
set mkisofs="mkisofs"
set mk_flags=""
set boot_opts=""
switch ($1)
#
# mac68k w/Rock Ridge and Apple Extensions
#
   case mac68k:
     set mkisofs="mkhybrid"
     set mk_flags="-H /usr/pkg/etc/mkhybrid.mapping"
#
# mac68k w/Rock Ridge Extensions
#
   case Mac68k:
     set rm_arch="-m alpha -m arm32 -m bebox -m i386 -m macppc -m mips -m 
pc532 -m pica -m pmax -m powerpc -m sparc -m vax"
     set rm_rels="-x ./arch/amiga -x ./${vers}/amiga"
     set rm_pkg="-m Amiga"
     set rm_snap=""
     breaksw
#
# i386 bootable and mac68k w/Rock Ridge, Joliet and Apple Extensions
#
   case mac386:
     set mkisofs="mkhybrid"
     set mk_flags="-J -H /usr/pkg/etc/mkhybrid.mapping"
#
# i386 bootable and mac68k w/Rock Ridge Extensions
#
   case Mac386:
     set rm_arch="-m alpha -m arm32 -m bebox -m macppc -m mips -m pc532 
-m pica -m pmax -m powerpc -m sparc -m vax"
     set rm_rels="-x ./arch/amiga -x ./${vers}/amiga"
     set rm_pkg="-m Amiga"
     set rm_snap=""
     set boot_opts="-b boot.image -c boot.catalog"
     breaksw
#
# i386 bootable w/Rock Ridge and Joliet Extensions
#
   case i386:
     set mkisofs="mkhybrid"
     set mk_flags="-J"
#
# i386 bootable w/Rock Ridge Extensions
#
   case I386:
     set rm_arch="-m alpha -m amiga -m arm32 -m atari -m bebox -m hp300 
-m m68k -m mac68k -m macppc -m mips -m mvme68k -m pc532 -m pica -m pmax 
-m powerpc -m sparc -m sun3 -m sun3x -m vax -m x68k"
     set rm_rels=""
     set rm_pkg="-m Amiga"
     set rm_snap=""
     end
     set boot_opts="-b boot.image -c boot.catalog"
     breaksw
#
# amiga w/Rock Ridge Extensions and long filenames
#
   case amiga:
     set mk_flags="-l"
#
# amiga w/Rock Ridge Extensions
#
   case Amiga:
     set rm_arch="-m alpha -m arm32 -m bebox -m i386 -m macppc -m mips -m 
pc532 -m pica -m pmax -m powerpc -m sparc -m vax"
     set rm_rels="-x ./arch/mac68k -x ./${vers}/mac68k"
     set rm_pkg="-m Mac68k"
     set rm_snap=""
     breaksw
   default:
     echo "Don't know how to do a snap for $1"
     exit 1
endsw
#
limit -h datasize unlimited
limit -h memoryuse unlimited
limit datasize unlimited
limit memoryuse unlimited
limit
set tmp=/tmp/$1
cd /home/Distrib
if (! -d ${tmp}) mkdir ${tmp}
if ("$2" != "") then
   rm -f ${tmp}/$2
else
   rm -rf ${tmp}/*
endif
#
# Make CDs with optional Mac or Joliet extensions
#
if ("${boot_opts}" != "") then
   rm -f boot.image boot.catalog
   cp ./${vers}/i386/installation/floppy/boot.fs boot.image
endif
if ("$2" == "" || "$2" == "usa") then
   ${mkisofs} -A "${vers} Nonexportable Distribution" ${boot_opts} \
   -P "http://www.netbsd.org and http://www.macbsd.com" \
   -p "Bob Nestor/rnestor@metronet.com" \
   ${mk_flags} -N -R -r -V "${vers} (USA/Canada)" \
   -m distfiles ${rm_vers} ${rm_rels} ${rm_pkg} ${rm_arch} ${rm_snap} \
   -o ${tmp}/${vers}.usa .
endif
#
if ("${boot_opts}" != "") rm -f boot.catalog
if ("$2" == "" || "$2" == "world") then
   ${mkisofs} -A "${vers} Exportable Distribution" ${boot_opts} \
   -P "http://www.netbsd.org and http://www.macbsd.com" \
   -p "Bob Nestor/rnestor@metronet.com" \
   ${mk_flags} -N -R -r -V "${vers} (World)" \
   -m distfiles ${rm_rels} ${rm_vers} ${rm_pkg} ${rm_arch} ${rm_snap} \
   -m security -o ${tmp}/${vers}.world .
endif
#
if ("${boot_opts}" != "") rm -f boot.image boot.catalog
#
if ("$2" == "" || "$2" == "packages") then
   ${mkisofs} -A "${vers} Package Distribution" \
   -P "http://www.netbsd.org and http://www.macbsd.com" \
   -p "Bob Nestor/rnestor@metronet.com" \
   ${mk_flags} -N -R -r -V "${vers} (Packages)" \
   -x ./FAQs -x ./arch -x ./NetBSD-current ${rm_vers} -x ./${vers} \
   -m pkgsrc ${rm_pkgbin} -m Extras ${rm_pkg} ${rm_arch} \
   -o ${tmp}/${vers}.packages .
endif