≡ Menu

Linux creating CD-ROM ISO image

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


# umount /mnt/cdrom

Create CD-ROM ISO image with dd command:

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


  • 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:

Share this on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 17 comments… add one }
  • Aatch January 6, 2008, 11:09 am

    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).

  • iceblox October 23, 2008, 1:52 pm

    You better add some blocksize parameter using bs=$something or it will take quite a while…

  • Benjamin M. Strozykowski February 19, 2009, 11:52 am

    This just made my day, thank you. For some reason, Brasero wouldn’t copy the cd, but dd did it without error.

    Thank you very much!

  • José Roberto August 23, 2009, 7:57 am

    I didn’t know i could do this directly :P

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

    Thank you! :D

  • Adso September 2, 2009, 11:33 pm

    It works, thanks!

  • leroy February 15, 2010, 3:44 am

    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.

  • Rafael December 21, 2010, 5:09 pm

    It works fine. Thanks.

  • Vikram December 24, 2010, 8:56 am

    Why is it necessary to unmount the CD-ROM first?

    • Aaron January 22, 2011, 10:31 pm

      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.

  • Maikel B February 19, 2011, 1:19 pm

    You just made my day :)


  • Donny April 4, 2011, 5:55 pm

    Thank You
    its great to work in the terminal
    i love Linux

  • DeepThnker May 14, 2011, 4:38 pm

    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!

    • satish July 22, 2011, 1:44 am


  • OM PRAKASH SINGH December 5, 2011, 3:04 pm

    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.
    OP Singh

    • Joe February 28, 2012, 9:00 pm

      just don’t do it.

  • Luiz Augusto February 18, 2012, 4:31 pm

    Very good!

  • Navazkhan September 25, 2014, 3:54 pm


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


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

Leave a Comment