In an ISO 9660 filesystem (commonly used for CD-ROMs and optical media), levels refer to the restrictions and naming conventions applied to file names and directory structures. The levels were designed to ensure compatibility across different platforms, such as MS-DOS, UNIX, and older systems that may have specific file and directory naming limitations.
The ISO 9660 standard defines three different levels (also known as Interchange Levels or Compliance Levels):
1️⃣ Level 1:
This is the default level.
- File names: 8 characters for the name, followed by a dot (
.
), and 3 characters for the extension (the classic 8.3 format). - Directory depth: The maximum directory nesting is 8 levels deep.
- File size: The maximum size of a file is 4 GB.
- Character set: Only uppercase letters (
A-Z
), digits (0-9
), and underscores (_
) are allowed in file names. - Restrictions:
- No spaces in file names.
- No symbolic links or special UNIX files (such as device nodes or pipes).
- Only one dot (
.
) is allowed in the file name, separating the name from the extension.
This level is the most restrictive but ensures maximum compatibility with older systems like MS-DOS.
2️⃣ Level 2:
- File names: File names can be up to 31 characters long, including the extension.
- Directory depth: Same as Level 1, with a maximum directory depth of 8 levels.
- File size: Same as Level 1, with a maximum file size of 4 GB.
- Character set: Still limited to uppercase letters (
A-Z
), digits (0-9
), and underscores (_
), but file names can be longer. - Restrictions:
- Only one dot (
.
) is allowed, separating the name from the extension.
- Only one dot (
Level 2 relaxes the file name length restriction compared to Level 1 but maintains other limitations for compatibility.
3️⃣ Level 3:
- File names: Same as Level 2, with file names up to 31 characters.
- Directory depth: Same as Levels 1 and 2, with a maximum of 8 directory levels.
- File size: Files can be larger than 4 GB (the size limitation is removed).
- Character set: Still limited to uppercase letters, digits, and underscores.
- Restrictions:
- The main difference from Level 2 is the support for file fragmentation. Level 3 allows files to be stored in multiple non-contiguous extents (fragments) on the disk.
Level 3 introduces support for larger files by allowing file fragmentation but otherwise is quite similar to Level 2.
Change ISO9660 to Level 3
The xorriso -as mkisofs
command support the setting of level explicitly, the ISO level is explicitly set using the -iso-level
option.
-iso-level 1|2|3 // the level could be 1, 2 or 3
Complete Command:
xorriso -as mkisofs -R -J -b stage1.bin -iso-level 3 -no-emul-boot -boot-load-size 4 -o $@ $(ISO_DIR)
-iso-level 3
:
- Sets the ISO level to Level 3, allowing for:
- Long file names (up to 31 characters).
- Large file sizes (greater than 4 GB).
- File fragmentation, meaning files can be split into non-contiguous blocks on the disk.