The mkisofs
command is a utility to create ISO 9660 image files. These images can be used to create CD or DVD discs or serve other purposes. mkisofs
is particularly powerful when it comes to creating bootable ISO images for operating system installations or other software distribution.
Overview
mkisofs
constructs an ISO image from provided files and directories. The basic syntax is:
mkisofs -o output_file.iso input_directory
Here, output_file.iso
is the ISO image file created from the contents of input_directory
.
Examples
To create an ISO image from the current directory:
mkisofs -o output.iso .
This command generates an ISO image named output.iso
from the current directory.
For a bootable ISO image from a directory with an operating system installation:
mkisofs -o output.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table input_directory
This command creates a bootable ISO image named output.iso
. The -b
option points to the boot image, -c
points to the boot catalog, while -no-emul-boot
, -boot-load-size
, and -boot-info-table
options configure the boot process.
Options
Available options for the mkisofs
command include:
Option | Description |
---|---|
-o output_file.iso | Specifies the name of the output ISO file. |
-b boot_image | Specifies the location of the boot image. |
-c boot_catalog | Specifies the location of the boot catalog. |
-no-emul-boot | Indicates the boot process should not emulate a floppy disk. |
-boot-load-size size | Specifies the size of the boot loader in sectors. |
-boot-info-table | Specifies that a boot information table should be included in the ISO image. |
-J | Indicates use of Joliet extensions. |
-R | Indicates use of Rock Ridge extensions. |
-V volume_id | Specifies the volume ID for the ISO image. |
-A application_id | Specifies the application ID for the ISO image. |
-p publisher_id | Specifies the publisher ID for the ISO image. |
-copyright copyright | Specifies the copyright information for the ISO image. |
-hide-rr-moved | Specifies that Rock Ridge moved files should be hidden. |
Troubleshooting Tips
If you encounter issues while using mkisofs
, consider the following tips:
- Ensure you have read permissions for the input files and write permissions for the output file.
- Verify the existence of the input directory and its contents.
- For bootable ISOs, ensure the boot image and boot catalog files are in the correct locations.
- If booting from the ISO image fails, check your computer’s BIOS settings to ensure it can boot from a CD or DVD.
Notes
mkisofs
is part of the cdrtools package, which is available for most Linux distributions. The ISO 9660 file system, a standard for CD-ROM and DVD-ROM file systems, is commonly used for software and data distribution.