The CloneCD utility is a command‑line tool that provides a reliable way to copy the contents of an optical disc (CD, DVD, Blu‑ray) into a filesystem image. It was created to address the need for a lightweight, yet featureful, replacement for legacy tools that often suffer from missing or corrupted data. By preserving the original layout, including the TOC and the file hierarchy, CloneCD helps archivists and developers keep perfect digital copies of any disc.
Introduction
CloneCD was originally conceived as a minimalistic disk‑copying solution for systems that use UDF or ISO‑9660 file systems. It is not a media‑burner; rather, it creates an image that can be subsequently written to an optical medium with another application (e.g. cdrecord or dd). The tool is distributed under the GPL‑3.0 license and is compatible with most Unix‑like operating systems.
Overview
CloneCD reads the raw sector stream from a CD‑ROM/DVD‑ROM/Blu‑ray device, writes it to a destination file, and performs an integrity check. It is particularly useful when:
- creating an archival backup of an entire collection of discs,
- transferring a disc’s data to a newer storage medium, or
- debugging the contents of a media that is no longer readable by a commercial player.
The design of CloneCD follows these core principles:
- Speed – It uses optimized read loops to keep the transfer rate close to the physical hardware limits.
- Accuracy – Sector‑by‑sector validation ensures that the destination image matches the source exactly.
- Portability – The source is written in C and relies on the
libcdiolibrary, which is available on all major Unix platforms.
Features
CloneCD offers a rich set of options that cater to both casual users and advanced archivists:
- Sector‑level copying – No data is lost; the entire raw image is written verbatim.
- Checksum generation – The user can choose MD5 or SHA1 to generate a file‑size fingerprint during the copy.
- Sector‑by‑sector verification – A post‑copy integrity test reads the image back and compares it with the source.
- Batch processing – Lists of devices can be processed automatically.
- Optional metadata extraction – TOC files and track information can be saved alongside the image.
- Cross‑platform – The tool works on Linux and macOS systems, and it is possible to port it to any POSIX‑compliant environment.
Installation
The source code can be compiled on Linux and macOS systems. To build CloneCD, a user needs a working C compiler (gcc or clang), the libcdio development headers, and the GNU Autotools for configuration. The typical build steps are:
$ tar xf clonecd-1.3.2.tar.gz
$ cd clonecd-1.3.2
$ ./configure
$ make
$ sudo make install
The configure script automatically detects the presence of libcdio and aborts if the library is not found. After installation, run clonecd --help to see the full set of options and usage instructions.
Usage
The most common usage pattern is a single command that reads from the source device and writes a file to the destination path. The basic syntax is:
clonecd [options] /dev/sgX destination.iso
where /dev/sgX is the device node for the optical drive and destination.iso is the output file name.
Basic Options
-b or --bytes – Display byte‑counts for source and destination. This is useful when you need to verify that the copy reached the expected size.
-t or --toc – Store the Table of Contents of the source disc in a .toc file. The TOC can later be used to recreate a structured database of disc metadata.
-z or --zero – Overwrite the destination file with zeroes before writing the image. This can help with garbage collection in certain file systems.
Advanced Features
CloneCD also offers a suite of advanced options that enable fine‑grained control over the copy process. These are especially useful for professional archivists or developers that need to script the tool for large batches.
Checksum Generation
CloneCD can compute a checksum of the output image during the copy. The result is stored in a text file named after the output image with a .checksum suffix. The algorithm can be chosen with the --checksum option; common choices include md5 and sha1.
Sector‑by‑Sector Verification
After cloning, the --verify flag instructs the utility to re‑read the created image through the optical drive and compare each sector with the source. Discrepancies are reported to the user, enabling early detection of errors.
Batch Processing
CloneCD’s --batch option allows users to provide a file containing a list of device paths, one per line. The utility processes each device sequentially, cloning each disc to an image in a predetermined naming convention. This feature is especially useful for archivists who need to clone large collections of discs.
Metadata Extraction
Metadata extraction is facilitated through the libcdio library, which provides access to the Table of Contents (TOC) of the source disc. clonecd can read track lengths, track types (audio or data), and the overall disc ID. The metadata can be stored in a .toc file alongside the cloned image.
FAQ
- What file system does CloneCD create?
- CloneCD creates a sector‑level binary image; no file system is applied. The image may be later written to an optical medium or mounted using tools like
mountwith-t iso9660for ISO images. - Can CloneCD handle encrypted media (CSS, UMD, etc.)?
- No. CloneCD reads raw data but does not decrypt protected sectors. For encrypted discs you need a dedicated ripping tool.
- Does CloneCD support live reading of a disc while it is being written?
- CloneCD requires the source to be in a readable state before it starts. It does not monitor live changes.
- Is there a graphical user interface?
- Not yet. CloneCD is a pure command‑line tool. The project team may provide a GUI in future releases.
Changelog
1.3.2 – 2024‑06‑18
- Added support for UDF 2.71.
- Fixed bug that caused
--checksumto fail on large images. - Improved error handling when the source device is not found.
1.3.1 – 2024‑04‑02
- Added
--verifyflag for sector‑by‑sector checks. - Updated the build system to work on macOS without external dependencies.
1.3.0 – 2023‑12‑15
- Initial release.
License
CloneCD is licensed under the GPL‑3.0. You may redistribute and modify the source code, provided you keep the same license and include the original copyright notice.
Contact
For bug reports or feature requests, email dev@clonecd.org or submit an issue on the project's GitHub page: https://github.com/clonecd/clonecd.
No comments yet. Be the first to comment!