Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-11-2006, 05:58 AM   #1
Registered: Jun 2002
Posts: 302

Rep: Reputation: 31
Best way to copy CD to ISO

I was wondering what the difference between using dd and k3b to copy a CD/DVD to create an ISO image. I tried out both dd and k3b and they created .iso images of different sizes. When I mount them using the loop back device, they have the same files but running kdiff3 shows me that some of the files are different. I verified that the files where not copied correctly using dd but where copied corrently using k3b. Although the individual files was identifical, running md5sum on some of them gave me an Input/Output error in the iso image created using dd. What does k3b do differently from dd? Here's the dd command that I used:

dd if=/dev/cdrom of=/mnt/sda3/tmp.iso
Old 04-11-2006, 06:36 AM   #2
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I've never had a problem with using dd to create an iso. I borrowed the following from
# See <>
# Reads directly from the CD or DVD device specified on the command line and dumps it to STDOUT
# Typical usage:
#       /dev/dvd > /tmp/dvd-contents.iso
# To use this script to check the md5sum of the CD, do the following:
#       /dev/cdrom | md5sum
#   compare the result with:
#                md5sum /tmp/dvd-contents.iso


blocksize=`/usr/bin/isoinfo -d -i $device | grep "^Logical block size is:" | cut -d " " -f 5`
if test "$blocksize" = ""; then
	echo catdevice FATAL ERROR: Blank blocksize >&2

blockcount=`/usr/bin/isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4`
if test "$blockcount" = ""; then
	echo catdevice FATAL ERROR: Blank blockcount >&2

command="/bin/dd if=$device bs=$blocksize count=$blockcount conv=notrunc,noerror"
echo "$command" >&2
Old 04-11-2006, 08:24 AM   #3
Registered: Jun 2002
Posts: 302

Original Poster
Rep: Reputation: 31
I tried using the script provided above this is the output that I'm getting:

421232640 bytes (421 MB) copied, 1085.77 seconds, 388 kB/s
dd: reading `/dev/cdrom': Input/output error
205680+0 records in
205680+0 records out
421232640 bytes (421 MB) copied, 1085.78 seconds, 388 kB/s
dd: reading `/dev/cdrom': Input/output error

I tried it again with k3b and it worked without any problems. Any ideas on how k3b does it behind the scenes?
Old 04-11-2006, 10:25 AM   #4
Senior Member
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Originally Posted by LinuxGeek
dd: reading `/dev/cdrom': Input/output error
That's a hardware error. check your dmesg - I'll bet you'll find more. there is probably something something going wrong with the cd or the drive.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iso copy Nuwan Shantha General 4 04-07-2006 05:35 PM
iso copy Nuwan Shantha Linux - Software 4 04-07-2006 05:03 AM
DVD copy question (using an ISO) eallen Linux - Software 4 03-11-2003 12:00 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration