Jump to content

ISO 9660

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Bumm13 (talk | contribs) at 23:05, 21 May 2020 (formatting fix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

ISO 9660 is a file system for optical disc media. Being published by the International Organization for Standardization (ISO) the file system is considered an international technical standard. Since the specification is available for anybody to purchase,[1] implementations have been written for many operating systems.

History

ISO 9660 traces its roots to the High Sierra Format file system.[2] High Sierra arranged file information in a dense, sequential layout to minimize nonsequential access by using a hierarchical (eight levels of directories deep) tree file system arrangement, similar to UNIX and FAT. To facilitate cross platform compatibility, it defined a minimal set of common file attributes (directory or ordinary file and time of recording) and name attributes (name, extension, and version), and used a separate system use area where future optional extensions for each file may be specified.

High Sierra was adopted in December 1986 (with changes) as an international standard by Ecma International as ECMA-119[3] and submitted for fast tracking to the ISO, where it was eventually accepted as ISO 9660:1988.[4]

In 2013, ISO published Amendment 1 to the ISO 9660 standard, introducing new data structures and relaxed file name rules intended to "bring harmonization between ISO 9660 and widely used 'Joliet Specification'."[5] In December 2017, a 3rd Edition of ECMA-119 was published that is technically identical with ISO 9660, Amendment 1.[6]

In 2020, ISO published Amendment 2, which adds some minor clarifying matter, but does not add or correct any technical information of the standard. [7]

Specifications

Overall structure

The following is the rough overall structure of the ISO 9660 file system:

ISO 9660 File System
System Area (32,768 B) Unused by ISO 9660
Data Area
Volume Descriptor Set
Path tables, Directories and Files

The System Area, the first 32,768 data bytes of the disc (16 sectors of 2,048 bytes each), is unused by ISO 9660 and therefore available for other uses. For example, a CD-ROM may contain an alternative file system descriptor in this area, as it is often used by hybrid CDs to offer classic Mac OS-specific and macOS-specific content.

All multi-byte values are stored twice, in little-endian and big-endian format, either one-after-another in what the specification calls "both-byte orders", or in duplicated data structures such as the path table. As the structures have been designed with unaligned members, this "both endian" encoding does however not help implementors as the data structures need to be read byte-wise to convert them to properly aligned data.

Volume descriptor set

The data area begins with a set of one or more volume descriptors, terminated with a volume descriptor set terminator. Collectively the volume descriptor set acts as a header for the data area, describing its content (similar to the BIOS parameter block used by FAT, HPFS and NTFS formatted disks).

Volume Descriptor Set
Volume Descriptor #1
...
Volume Descriptor #N
Volume Descriptor Set Terminator

The volume descriptor set terminator is simply a particular type of volume descriptor with the purpose of marking the end of this set of structures.

Volume descriptor

Each volume descriptor is 2048 bytes in size, fitting perfectly into a single Mode 1 or Mode 2 Form 1 sector. They have the following structure:

← 2,048 bytes →
Parts Type Identifier (always 'CD001') Version (always 0x01) Data
Sizes 1 byte 5 bytes 1 byte 2,041 bytes

The data field of a volume descriptor may be subdivided into several fields, with the exact content depending on the type.

Standard volume descriptor types are the following:

Basic Volume Descriptor Types
Type field value Type
0 Boot Record Volume Descriptor
1 Primary Volume Descriptor
2 Supplementary Volume Descriptor, or

Enhanced Volume Descriptor

3 Volume Partition Descriptor
255 Volume Descriptor Set Terminator

An ISO 9660 compliant disc contains at least one Primary Volume Descriptor describing the file system and a Volume Descriptor Set Terminator for indicating the end of the descriptor sequence.

The Primary Volume Descriptor provides information about the volume, characteristics and metadata, including a root directory record that indicates in which sector the root directory is located. Other fields contain the description or name of the volume, and information about who created it and with which application. The size of the logical blocks which the file system uses to segment the volume is also stored in a field inside the primary volume descriptor, as well as the amount of space occupied by the volume (measured in number of logical blocks).

In addition to the Primary Volume Descriptor(s), Supplementary Volume Descriptors or Enhanced Volume Descriptors may be present.

Supplementary Volume Descriptors describe the same volume as the Primary Volume Descriptor does, and are normally used for providing additional code page support when the standard code tables are insufficient. The standard specifies that ISO 2022 is used for managing code sets that are wider than 8 bytes, and that ISO 2375 escape sequences are used to identify each particular code page used. Consequently, ISO 9660 supports international single-byte and multi-byte character sets, provided they fit into the framework of the referenced standards. However, ISO 9660 does not specify any code pages that are guaranteed to be supported: all use of code tables other than those defined in the standard itself are subject to agreement between the originator and the recipient of the volume.

Enhanced Volume Descriptors were introduced in ISO 9660, Amendment 1. They relax some of the requirements of the other volume descriptors and the directory records referenced by them: for example, the directory depth can exceed eight, file identifiers need not contain '.' or file version number, the length of a file and directory identifier is maximized to 207.

Redundant copies of each volume descriptor can also be included in case the first copy of the descriptor becomes corrupt.

Directories and files

Overview of the ISO 9660 directory structure

Directory entries are stored following the location of the root directory entry, where evaluation of filenames is begun. Both directories and files are stored as extents, which are sequential series of sectors.

Files and directories are differentiated only by a file attribute that indicates its nature (similar to Unix). The attributes of a file are stored in the directory entry that describes the file, and optionally in the extended attribute record.

To locate a file, the directory names in the file's path can be checked sequentially, going to the location of each directory to obtain the location of the subsequent subdirectory. However, a file can also be located through the path table provided by the file system. This path table stores information about each directory, its parent, and its location on disc. Since the path table is stored in a contiguous region, it can be searched much faster than jumping to the particular locations of each directory in the file's path, thus reducing seek time.

The standard specifies three nested levels of interchange (paraphrased from section 10):

  • Level 1: File names are limited to eight characters with a three-character extension. Directory names are limited to eight characters. Files may contain one single file section.
  • Level 2: Files may contain one single file section.
  • Level 3: No additional restrictions than those stipulated in the main body of the standard. That is, directory identifiers may not exceed 31 characters in length, and file name + '.' + file name extension may not exceed 30 characters in length (sections 7.5 and 7.6). Files are also allowed to consist of multiple non-contiguous sections (with some restrictions as to order).

Additional restrictions in the body of the standard: The depth of the directory hierarchy must not exceed 8 (root directory being at level 1), and the path length of any file must not exceed 255. (section 6.8.2.1).

The standard also specifies the following name restrictions (sections 7.5 and 7.6):[4]

  • All levels restrict file names in the mandatory file hierarchy to upper case letters, digits, underscores ("_"), and a dot. (see also section 7.4.4 and Annex A),
  • If no characters are specified for the File Name then the File Name Extension shall consist of at least one character.
  • If no characters are specified for the File Name Extension then the File Name shall consist of at least one character.
  • File names shall not have more than one dot.
  • Directory names shall not use dots at all.

Path tables

Path tables summarize the directory structure of the relevant directory hierarchy, providing only the directory identifier, the location of the extent in which the directory is recorded, the length of any extended attributes associated with the directory, and the index of its parent directory path table entry.

Limitations

Directory depth limit

The restrictions on filename length (8 characters plus 3 character extension for interchange level 1) and directory depth (8 levels, including the root directory[8]) are a more serious limitation of the ISO 9660 file system.

The Rock Ridge extension works around the eight-directory depth limit by folding paths. In practice, however, few drivers and OSes care about the directory depth, so this rule is often ignored.

In addition to the restrictions mentioned above, a CD-ROM producer may choose one of the lower Levels of Interchange specified in chapter 10 of the standard, and further restrict file name length from 30 characters to only 8+3 in file identifiers, and 8 in directory identifiers in order to promote interchangeability with implementations that do not implement the full standard. (This is sometimes mistakenly interpreted as a restriction in the ISO 9660 standard itself.)

The 2/4 GiB file size limit

All numbers in ISO 9660 file systems except the single byte value used for the GMT offset are unsigned numbers. As the length of a file's extent on disc is stored in a 32 bit value,[9] it allows for a maximum length of just over 4.2 GB (more precisely, one byte less than 4 GiB). (Note: Some older operating systems may handle such values incorrectly (i.e. signed instead of unsigned), which would make it impossible to access files larger than 2 GB in size. The latter holds true also for operating systems without large file support.)

Based on this, it is often assumed that a file on an ISO 9660 formatted disc cannot be larger than 232-1 in size, as the file's size is stored in an unsigned 32 bit value, for which 232-1 is the maximum.

It is, however, possible to circumvent this limitation by using the multi-extent (fragmentation) feature of ISO 9660 Level 3 to create ISO 9660 file systems and single files up to 8 TiB. With this, files larger than 4 GiB can be split up into multiple extents (sequential series of sectors), each not exceeding the 4 GiB limit. For example, the free software such as InfraRecorder, ImgBurn and mkisofs as well as Roxio Toast are able to create ISO 9660 file systems that use multi-extent files to store files larger than 4 GiB on appropriate media such as recordable DVDs.

Empirical tests with a 4.2 GB fragmented file on a DVD media have shown that Microsoft Windows XP supports this, while Mac OS X (as of 10.4.8) does not handle this case properly.[original research?] In the case of Mac OS X, the driver appears not to support file fragmentation at all (i.e. it only supports ISO 9660 Level 2 but not Level 3). Linux supports multiple extents.[10]

Limit on number of directories

Another limitation is the number of directories. The ISO image has a structure called "path table". For each directory in the image, the path table provides the number of its parent directory entry. The problem is that the parent directory number is a 16-bit number, limiting its range from 1 to 65,535.[11] The content of each directory is written also in a different place, making the path table redundant, and suitable only for fast searching.

Some operating systems (e.g. Windows) use the path table, while others (e.g. Linux) do not. If an ISO image or disc consists of more than 65,535 directories, it will be readable in Linux, while in early Windows versions all files from the additional directories will be visible, but show up as empty (zero length).[citation needed]

Some software tools can have problems managing the path table if the directory limit is exceeded. A popular application using ISO format, mkisofs, aborts if there is a path table overflow. Nero Burning ROM (for Windows) and Pinnacle Instant CD/DVD do not check whether the problem occurs, and will produce an invalid ISO file or disc without warning.

Extensions and improvements

There are several extensions to ISO 9660 that relax some of its limitations.

For operating systems which do not support any extensions, a name translation file TRANS.TBL must be used. It should be located in every directory, including the root directory. This is now obsolete, since few such operating systems are in use today.

The ISO 13490 standard is an extension to the ISO 9660 format that adds support for multiple sessions on a disc. Since ISO 9660 is by design a read-only, pre-mastered file system, all the data has to be written in one go or "session" to the medium. Once written, there is no provision for altering the stored content. ISO 13490 was created to allow adding more files to a writeable disc such as CD-R in multiple sessions.

The ISO 13346/ECMA-167[12] standard was designed in conjunction to the ISO 13490 standard to address most of the shortcomings of ISO 9660,[13] and a subset of it evolved into the UDF format, which was adopted for DVDs.

JIS X 0606:1998, also known as ISO 9660:1999, is a Japanese Industrial Standard draft created by the Japanese National Body (JTC1 N4222) in order to make some improvements and remove some limitations from the original ISO 9660 standard.[14] This draft was submitted in 1998, but it has not been ratified as an ISO standard yet. Some of its changes includes the removal of some restrictions imposed by the original standard by extending the maximum file name length to 207 characters, removing the eight-level maximum directory nesting limit, and removing the special meaning of the dot character in filenames. Some operating systems allow these relaxations as well when reading optical discs. Several disc authoring tools (such as Nero Burning ROM, mkisofs and ImgBurn) support a so-called "ISO 9660:1999" mode (sometimes called "ISO 9660 v2" or "ISO 9660 Level 4" mode) that removes restrictions following the guidelines in the ISO 9660:1999 draft.

Disc images

ISO 9660 file system images (ISO images) are a common way to electronically transfer the contents of CD-ROMs. They often have the filename extension .iso (.iso9660 is less common, but also in use) and are commonly referred to as "ISOs".

Operating system support

Most operating systems support reading of ISO 9660 formatted discs, and most new versions support the extensions such as Rock Ridge and Joliet. Operating systems that do not support the extensions usually show the basic (non-extended) features of a plain ISO 9660 disc.

Operating systems that support ISO 9660 and its extensions include the following:

See also

References

  1. ^ "ISO 9660:1988(en), Information processing — Volume and file structure of CD-ROM for information interchange". ISO (International Organization for Standardization). ISO. 1988. Retrieved 17 December 2017.
  2. ^ "Working Paper for Information Processing: Volume and File Structure of CD-ROM for Information Interchange". Optical Information Systems. 7 (1): 29–49. January 1987.
  3. ^ "Volume and File Structure of CDROM for Information Interchange". Ecma International. December 1987.
  4. ^ a b Volume and file structure of CD-ROM for information interchange (corrected ed.). Geneva: International Organisation for Standardization (ISO). 1 September 1988.
  5. ^ ISO 9660, Amendment 1 (ISO 9660:1988/Amd.1:2013(E))
  6. ^ "Standard ECMA-119" (PDF). Ecma International. Ecma. p. vii. Retrieved 16 August 2018.
  7. ^ ISO 9660, Amendment 2 (ISO 9660:1988/Amd.2:2020(E))
  8. ^ ISO 9660, section 6.8.2.1
  9. ^ ISO 9660 section 9.1.4
  10. ^ kern/95222: File sections on ISO9660 {{sic}} level 3 CDs ignored
  11. ^ ISO9660 sections 6.9 and 9.4.4
  12. ^ ECMA-167 - Volume and File Structure for Write-Once and Rewritable Media using Non-Sequential Recording for Information Interchange
  13. ^ Birth Announcement: ISO/IEC 13346 and ISO/IEC 13490
  14. ^ JIS X 0606:1998 / ISO 9660:1999 Draft Specification
  15. ^ "The Virtual GS: Using ISO disk images in Apple II emulators" (PDF). Juiced.GS Volume 9, Issue 2. May 2004.
  16. ^ "Work with PC-created Joliet Level 3 CDs". 16 April 2004.
  17. ^ "The OpenVMS Frequently Asked Questions (FAQs)". Hoffman Labs. Retrieved 1 September 2011.