How to Add Files to an ISO Image in Linux

An ISO image is a computer archived version of a CD or DVD disc. When working with an ISO image, it may be necessary to add files to the disc. As with physical discs, modifying an ISO image is not always easy and the only reliable method for adding files to the disc image is to create a copy of the image and re-create the ISO image with the additional files. This process is a simple manner in the Linux terminal, requiring just a few commands.

Step 1

Launch Terminal.

Step 2

Create a mounting point for the ISO image using the following command: sudo mkdir /media/iso

Step 3

Mount the ISO image with the following command, making sure to specify the location on the hard drive of the ISO file you wish to edit: sudo mount -o loop /location/of/ISO/file.iso /media/iso

Step 4

Create a directory to copy the ISO contents with the following command (you can change the destination directory to whatever you want): sudo mkdir /mnt/test

Step 5

Copy the contents of the mounted ISO with the following command: sudo cp /media/iso/* /mnt/test

Step 6

Unmount the ISO file with the following command: sudo unmount /media/iso

Step 7

Copy the files you wish to add to the ISO image using your file manager.

Step 8

Create a new ISO image containing the additional files with the following command, making certain to execute the command from within the "/mnt/test" directory (the ISO image file name and destination can be changed to whatever you prefer): mkisofs -r -o /home/newfile.iso