Create an ISO File in Linux

This article gives you the basic command for creating an image file from a CD/DVD device in Linux.

As an example, we will copy the contents of your disk in the CD/DVD drive (/dev/cdrom) on your PC or laptop into an ISO file.

Note that some Linux distributions will use /dev/sr0 instead of /dev/cdrom and if you have multiple CD/DVD drives, the number may be /dev/sr0 and /dev/sr1 for the first and second drives respectively.

Steps

Using the Terminal

  1. Boot up Linux.
  2. Go to a terminal screen. You can usually right-click on the desktop and choose this option from the drop-down menu. Ctrl+Alt+T will usually open the Terminal as well.
  3. Create an ISO from a CD. Type dd if=/dev/cdrom of=~/cdrom_image.iso. This will create an ISO from the inserted CD.
  4. Make an ISO of a directory. Type mkisofs -o /tmp/cd.iso /tmp/directory/ to make an ISO from files on your hard drive.

Using a Program

  1. Open a CD/DVD burning program. In Ubuntu, the default program is Brasero. You can open it by pressing the Super key (usually the Win key) searching for "brasero".
  2. Select "Data project". This is one of the available options when you first open Brasero in the "Create a new project" window.
  3. Add your files. Click the green "+" button in the upper-left corner of the window. Browse for files that you want to add and select them to ad them to the list.
  4. Name the ISO file. In the field at the bottom of the window, enter a name for the ISO file. This will help you find it later.
  5. Ensure that no blank discs are inserted. If you have a blank disc inserted, you will automatically burn to it instead of creating an ISO file.
  6. Click Burn. You will be asked where you want to save the ISO file to. Set a location and then click "Create Image". The ISO file will be created and placed in the location you specified.
  7. Burn the ISO file to a disc. If you decide later that you would like to burn the image, right-click on it and select "Open with Brasero Disc Burner". Select your drive and then click "Create Image".[1]

Tips

  • dd can be easily remembered as "disk dump".
  • if means "input file."
  • of means "output file."
  • ISO is the resulting file that will contain all of the data that is on your CD/DVD disk."

Warnings

  • Also... when creating an ISO file, the device must not be mounted. To unmount the cdrom device, use the "umount" command as follows:
    • umount /dev/cdrom
  • You may also use 'sudo' to ensure you have proper permissions, but this also means you must have 'sudo' access on the system. Check the /etc/sudoers file for information.
  • You *must* have permission to access the drive directly using 'dd'. 'mount' permissions are not necessarily the same as 'dd' permissions!

Related Articles

Sources and Citations