Creating a hybrid CD

Warning: The content of this article may be out of date. It was last updated in 2001.

As a cross platform product, releases of Mozilla on CD should also work on any platform. The CD should support HFS (Macintosh), Joliet (Win32), and Rock Ridge (Unix). Many Mozilla files have long file names which makes creating the CD on a Macintosh difficult because the HFS filesystem limits the length of file names to 32 characters.

The utility mkhybrid lets you create hybrid CDs that work with all three filesystems. Mkhybrid was written by James Pearson and is is a component of the latest versions of cdrecord. I used version 1.8.1a03 although you'll probably want to get a newer one.

Here's what I did to create the CD for the second anniversary party.

mkhybrid -o ~/party.iso -r -J -hfs -V mozilla.party -map ~/HFSmapping ~/party/
cdrecord -v speed=2 dev=0,6,0 ~/party.iso

Its also handy to be able to mount an image file to test it.

mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024
umount /mnt/cdrom

Here is the HFS mapping that I used. The Creator "MOSS" is for Netscape 4.x and "MOZZ" is used for Mozilla. It is used as the creator type for README and other text files because it can handle Unix and Windows linebreaks, but teachtext cannot.

# Example filename mapping file used by mkhybrid for hfs
#
# EXTN   XLate   CREATOR   TYPE     Comment
.hqx     Ascii   'SITx'    'TEXT'   "BinHex file"
.zip     Raw     'SITx'    'ZIP '   "Zip file"
.gz      Raw     'SITx'    'ZIP '   "gzip file" 
.tgz     Raw     'SITx'    'ZIP '   "tar.gz gzip file" 
.tar     Raw     'SITx'    'TARF'   "tar file" 
.tif     Raw     '8BIM'    'TIFF'   "Photoshop TIFF image"
.doc     Raw     'MSWD'    'WDBN'   "Word file"
.mov     Raw     'TVOD'    'MooV'   "QuickTime Movie"
.bin     Raw     'SITx'    'BINA'   "Mac Binary"
.h       Ascii   'CWIE'    'TEXT'   "C/C++ header file"
.c       Ascii   'CWIE'    'TEXT'   "C source file"
.cp      Ascii   'CWIE'    'TEXT'   "C++ source file"
.cpp     Ascii   'CWIE'    'TEXT'   "C++ source file"
.exp     Ascii   'CWIE'    'TEXT'   "Symbol export file"
.mcp     Raw     'CWIE'    'MMPr'   "CodeWarrior project file"
.r       Ascii   'MPS '    'TEXT'   "Rez file"
.html    Ascii   'MOSS'    'TEXT'   "HTML file"
.htm     Ascii   'MOSS'    'TEXT'   "HTML file"
.txt     Ascii   'MOSS'    'TEXT'   "text file"
README   Ascii   'MOSS'    'TEXT'   "text file"
CHANGES  Ascii   'MOSS'    'TEXT'   "text file"
INSTALL  Ascii   'MOSS'    'TEXT'   "text file"
LICENSE  Ascii   'MOSS'    'TEXT'   "text file"
.gif     Raw     'ogle'    'GIFf'   "GIF file"
.png     Raw     'ogle'    'PNG '   "PNG file"
.jpg     Raw     'ogle'    'JPEG'   "JPEG file"
.jpeg    Raw     'ogle'    'JPEG'   "JPEG file"
.pl      Ascii   'McPL'    'TEXT'   "Perl file"
.pm      Ascii   'McPL'    'TEXT'   "Perl module file"
.xml     Ascii   'R*ch'    'TEXT'   "XML file"
.xul     Ascii   'R*ch'    'TEXT'   "XUL file"
.xbl     Ascii   'R*ch'    'TEXT'   "XBL file"
.css     Ascii   'R*ch'    'TEXT'   "CSS file"
.dtd     Ascii   'R*ch'    'TEXT'   "DTD file"
.js      Ascii   'R*ch'    'TEXT'   "JavaScript file"
.mp3     Raw     'TVOD'    'MPG3'   "MPEG file"
.mpg     Raw     'TVOD'    'MPEG'   "MPEG file"
.mpeg    Raw     'TVOD'    'MPEG'   "MPEG file"
.au      Raw     'TVOD'    'ULAW'   "Audio file"
*        Ascii   'ttxt'    'TEXT'   "Text file"

For more information about recording CDs, see the CD-Recordable FAQ.

Original Document Information

  • Author(s): Dawn Endico
  • Last Updated Date: May 1, 2001
  • Copyright Information: Portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details.

Document Tags and Contributors

 Contributors to this page: teoli, kohei.yoshino
 Last updated by: kohei.yoshino,