Create an ISO

How to create a copy of a CD/DVD or a local directory and store it as an ISA file.

Share
Create an ISO
Photo by Cameron Bunney / Unsplash

Create an ISO

Creating an ISO image from almost any media is straightforward in Linux. Run a dd or mkisofs with the inputs:

    • state what to use as the source and
    • state the name and address of the final file.

In this example, we're going to copy the contents of a disk in the DVD drive (/dev/cdrom) to an ISO image file. We will use the dd command to convert and copy a file. Using the following flags:

    • if defines the input file
    • of defines the output file
    • iso is for the ISO image file.

Create from a CD or a DVD

dd if=/dev/cdrom of=/home/user/my.iso

Create from files in a directory

To create an ISO image from files request to have the files within a directory. We use the mkisofs command, state an input directory, and name the ISO file you are to create, using the flag:

    • -o defines the name and address of the file
mkisofs -o /home/user/test.iso /source/directory/



References

dd [1] mkisofs [2]


  1. dd - convert and copy a file manpage. Full documentation https://www.gnu.org/software/coreutils/dd or available locally via: info '(coreutils) dd invocation' ↩︎

  2. mkisofs - create an hybrid ISO-9660/JOLIET/HFS/UDF filesystem-image with optional Rock Ridge attributes. manpage. mkisofs is available as part of the cdrecord package from ftp://ftp.berlios.de/pub/cdrecord/ ↩︎