genisoimage
Create ISO 9660 filesystem images
TLDR
Create an ISO image from the given source directory
Create an ISO image with files larger than 2GiB by reporting a smaller apparent size for ISO9660 filesystems
SYNOPSIS
genisoimage [options] -o filename pathspec [pathspec ...]
PARAMETERS
-o filename
Specifies the output filename for the ISO image. This option is mandatory.
-R
Enable Rock Ridge extensions, preserving UNIX file attributes like long filenames, permissions, and symbolic links.
-r
Similar to -R, but sets all files to read-only for everyone and turns off UID/GID preservation, making the image more portable.
-J
Enable Joliet extensions, providing compatibility with Microsoft Windows systems by supporting Unicode filenames up to 64 characters.
-U
Allows 'untranslated' filenames, useful when using Joliet or Rock Ridge for filenames that do not map to the ISO9660 filename character set.
-V id
Sets the volume ID (or volume label) of the CD/DVD. Max 32 characters.
-b eltorito_boot_image
Specifies the path to the El Torito boot image, making the CD/DVD bootable. The path must be relative to the source directory.
-c boot_catalog
Specifies the path to the El Torito boot catalog file, which contains information about the boot images.
-udf
Creates a UDF (Universal Disk Format) filesystem image, which offers better support for large files and modern operating systems than ISO9660.
-hfs
Creates an Apple HFS+ filesystem image, compatible with macOS.
-print-size
Prints the estimated size of the ISO image in sectors to standard error before writing it.
-iso-level level
Specifies the ISO9660 conformance level (1, 2, 3, or 4). Higher levels allow longer filenames and deeper directory structures.
-input-charset charset
Specifies the character set used for input filenames. Useful when dealing with filenames containing non-ASCII characters.
-exclude-list file
Reads a list of paths from file to be excluded from the ISO image. Each path must be on a new line.
-v
Enables verbose output, showing more details about the image creation process.
DESCRIPTION
The genisoimage command is a powerful utility used to create ISO9660, Joliet, and UDF filesystem images from a given set of files and directories. These images are typically used for optical media like CDs, DVDs, and Blu-ray discs, or for creating bootable USB drives and virtual machine images. It functions by arranging files into a structure that conforms to various CD/DVD/BD standards, handling file permissions, timestamps, and symbolic links.
As a robust and widely used tool, genisoimage supports several extensions, including Rock Ridge (for UNIX-like systems, preserving long filenames and permissions), Joliet (for Windows, supporting Unicode filenames), and El Torito (for creating bootable media). It is an essential part of the Linux toolkit for anyone needing to archive data, distribute software, or prepare system installation media.
CAVEATS
When creating images, be aware of character set issues, especially with non-ASCII filenames; explicit use of -input-charset or -output-charset may be necessary. Combining different extensions like Joliet and Rock Ridge can lead to complex filename mappings. Large file support is limited by ISO9660 specifications unless UDF is explicitly used. genisoimage needs sufficient temporary disk space, often twice the size of the final image, during its operation.
FILESYSTEM EXTENSIONS
Beyond the basic ISO9660 standard, genisoimage supports several extensions to enhance compatibility and features:
Rock Ridge: Designed for UNIX and Linux systems, allowing for long filenames (up to 255 chars), deep directory hierarchies, UNIX file permissions, and symbolic links.
Joliet: Developed by Microsoft, primarily for Windows systems, supporting Unicode filenames up to 64 characters and deeper directory structures than basic ISO9660.
UDF (Universal Disk Format): A newer standard offering robust support for larger files (over 4GB) and better cross-platform compatibility, often used for DVDs and Blu-ray discs. genisoimage can create pure UDF images or hybrid ISO9660/UDF images.
CREATING BOOTABLE IMAGES
genisoimage supports the El Torito standard for creating bootable CDs/DVDs. This involves specifying a boot image using -b and optionally a boot catalog using -c. The boot image can be a floppy emulation, hard disk emulation, or a 'no emulation' boot image, which is common for modern Linux distributions. Proper configuration of these options is crucial for creating a bootable disk that systems can recognize and boot from.
HISTORY
The genisoimage command is a fork of the original mkisofs program, which was developed by Eric Youngdale. The split occurred mainly due to licensing disagreements between the `cdrtools` suite (which includes mkisofs) and the GPL license commonly used in Linux distributions. genisoimage became part of the cdrkit project, initiated by Debian, ensuring an open-source, GPL-compatible alternative for CD/DVD image creation. It maintains much of the functionality and command-line syntax of its predecessor.