Linux creating CD-ROM ISO image

Posted on in Categories FreeBSD, Howto, Linux, Solaris last updated May 19, 2006

dd is a perfect tool for copy a file, converting and formatting according to the operands. It can create exact CD-ROM ISO image.

This is useful for making backup as well as for hard drive installations require a working the use of ISO images.

How do I use dd command to create an ISO image?

Put CD into CDROM

Do not mount CD. Verify if cd is mounted or not with mount command:

# mount

If cd was mouted automatically unmout it with umount command:

# umount /dev/cdrom

OR

# umount /mnt/cdrom

Create CD-ROM ISO image with dd command:

# dd if=/dev/cdrom of=/tmp/cdimg1.iso

Where,

  • if=/dev/cdrom: Read from /dev/cdrom (raw format)
  • of=/tmp/cdimg1.iso: write to FILE cdimg1.iso i.e. create an ISO image

Now you can use cdimg1.iso for hard disk installation or as a backup copy of cd. Please note that dd command is standard UNIX command and you should able to create backup/iso image under any UNIX like operating system.

See also:

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

17 comment

  1. This has cemented my love of *nix. I already knew that you could mount disk images using mount, but the using of dd to make a disk image. That was the best bit. I have the need to make alot of images, for various reasons. And its faster than on windows. (In my experience anyway).

  2. I didn’t know i could do this directly ๐Ÿ˜›

    I used to do:
    dd if=/dev/cdrom1 of=./image.img
    img2iso image.img image.iso

    Thank you! ๐Ÿ˜€

  3. I have a Dual booted pc (Linux/XP) I would like to take the Windows XP partition and create an ISO for a VM. Is it possible? I expect when XP wakes up in a VM environment there might be a few problems with hardware recognition but that can be addressed later.

    1. Using this method is reading the bits straight from the device. If it is mounted, then the device will be “in use” as it is already mounted to another folder. You could still use dd to make an image of the mounted location (i.e., /media/mounteddisk) but then it would be like burning a folder to disk instead of getting the exact formatting of a CD.

  4. Thanks!
    Iam using fedora 14 and all the gui programs are buggy, crashing and sometimes they have problems with certain CDs,but
    dd… and the other command line tools.. they never leaves me in the lurch!

  5. Hello friends
    I need your help in installing redhat linux5 on my laptop compaq presario cq40 having windows vista operating system. when I am installing linux then it is not recognizing my partition and dvdram drive asking for the location of linux image. I have formated one partition with ext3 but it is not seen by windows. how ever when loading linux it detects my hard disk but not finding image. I don’t know how to load the image of linux in cd from windows vista operating system. if you can help me in this regard then I will remain thankful to you.
    thanks
    OP Singh

  6. Where,

    if=/dev/cdrom: Read from /dev/cdrom (raw format)
    of=/tmp/cdimg1.iso: write to FILE cdimg1.iso i.e. create an ISO image

    FOR CORRECTION:

    if=/dev/cdrom (will not be constant) cdrom name will change, check for the correct name.

Comments are closed.