Optical discs are easy to misplace, scratch, or leave tied to one drive when the data needs to be archived or reused elsewhere. Copying a data CD, DVD, or Blu-ray disc into an ISO file preserves the disc filesystem as one image that can be checksummed, mounted, attached to a virtual machine, or written back to other media.

Linux exposes most data optical media as a read-only block device such as /dev/sr0. The dd command reads that device sector by sector, writes the result to an .iso file, and reports the final record counts so the copy can be checked before the original disc is put away.

Direct block-device copies work best with data discs that the kernel can read through a normal optical drive device. Audio CDs, mixed-mode discs, damaged media, and copy-protected discs often need ripping or recovery tools instead, and the destination filesystem must have enough free space for the full disc image.

Steps to create an ISO image from an optical disc in Linux:

  1. List block devices and identify the inserted optical disc.
    $ lsblk --paths --list --output PATH,SIZE,TYPE,RO,MOUNTPOINTS
    PATH        SIZE TYPE RO MOUNTPOINTS
    /dev/sda    477G disk  0
    /dev/sda1     1G part  0 /boot/efi
    /dev/sda2   476G part  0 /
    /dev/sr0    4.3G rom   1

    Use the read-only rom device, usually /dev/sr0. Systems with more than one optical drive can expose another /dev/sr* path.

  2. Create the destination directory for the ISO file.
    $ mkdir -p "$HOME/iso-backups"
  3. Copy the optical disc into an ISO file.
    $ sudo dd if=/dev/sr0 of="$HOME/iso-backups/archive-disc.iso" bs=2048 status=progress conv=fsync
    370038+0 records in
    370038+0 records out
    757837824 bytes (758 MB, 723 MiB) copied, 24.3 s, 31.2 MB/s

    Replace /dev/sr0 with the optical device from lsblk. bs=2048 matches the data-sector size used by ISO optical media, status=progress shows progress on longer reads, and conv=fsync flushes the output file before dd exits.

    If dd reports an input/output error, treat the image as incomplete. Clean the disc, try another drive, or use a recovery-oriented tool instead of trusting the partial file.

  4. Confirm that the saved file is recognized as an ISO image.
    $ file "$HOME/iso-backups/archive-disc.iso"
    /home/operator/iso-backups/archive-disc.iso: ISO 9660 CD-ROM filesystem data 'ARCHIVE_DISC'

    The label comes from the disc and may differ. Some DVD or Blu-ray media can report UDF or mixed ISO 9660 and UDF metadata instead.

  5. Create a temporary mountpoint for the saved image.
    $ sudo mkdir -p /mnt/archive-disc
  6. Mount the saved ISO image read-only through a loop device.
    $ sudo mount -o loop,ro "$HOME/iso-backups/archive-disc.iso" /mnt/archive-disc

    Loop mounting checks the saved image without inserting the original disc again.

  7. List the top-level files in the mounted image.
    $ ls -1 /mnt/archive-disc
    docs
    readme.txt
  8. Unmount the saved image after the content check.
    $ sudo umount /mnt/archive-disc
  9. Remove the temporary mountpoint.
    $ sudo rmdir /mnt/archive-disc