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. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-11-2006, 05:58 AM
|
#1
|
Member
Registered: Jun 2002
Posts: 302
Rep:
|
Best way to copy CD to ISO
Hi,
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
|
|
|
04-11-2006, 06:36 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
I've never had a problem with using dd to create an iso. I borrowed the following from http://www.troubleshooters.com/linux/coasterless.htm:
Code:
#!/bin/bash
#
# See <http://www.troubleshooters.com/linux/coasterless.htm>
# Reads directly from the CD or DVD device specified on the command line and dumps it to STDOUT
#
# Typical usage:
# copy-raw-cd.sh /dev/dvd > /tmp/dvd-contents.iso
#
# To use this script to check the md5sum of the CD, do the following:
# copy-raw-cd.sh /dev/cdrom | md5sum
# compare the result with:
# md5sum /tmp/dvd-contents.iso
#
device=$1
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
exit
fi
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
exit
fi
command="/bin/dd if=$device bs=$blocksize count=$blockcount conv=notrunc,noerror"
echo "$command" >&2
$command
|
|
|
04-11-2006, 08:24 AM
|
#3
|
Member
Registered: Jun 2002
Posts: 302
Original Poster
Rep:
|
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?
|
|
|
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:
|
Quote:
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.
|
|
|
All times are GMT -5. The time now is 04:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|