LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   cdrom input/output error (http://www.linuxquestions.org/questions/linux-hardware-18/cdrom-input-output-error-221079/)

krystianownz 08-22-2004 09:15 PM

cdrom input/output error
 
Whenever I copy larger files off of cdrom to hard drive, I get an error:
Code:

$ cp /mnt/cdrom/foo .
cp: reading `/mnt/cdrom/foo': Input/output error

It copies the file partially, but quits without completing. I know I have enough disk space (the following listing is with most of the file off the cdrom already on disk):
Code:

# df
Filesystem            Size  Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part1
                      5.0G  2.6G  2.1G  56% /
/dev/ide/host0/bus0/target0/lun0/part6
                      3.1G  2.5G  634M  80% /home
/dev/ide/host0/bus1/target0/lun0/cd
                      414M  414M    0 100% /mnt/cdrom

and dmesg returns about 300 lines that look like the following:
Code:

hdc: rw=0, want=846756, limit=846748
Buffer I/O error on device hdc, logical block 211688
attempt to access beyond end of device
hdc: rw=0, want=846760, limit=846748
Buffer I/O error on device hdc, logical block 211689
attempt to access beyond end of device
hdc: rw=0, want=846764, limit=846748
Buffer I/O error on device hdc, logical block 211690
attempt to access beyond end of device
hdc: rw=0, want=846768, limit=846748
Buffer I/O error on device hdc, logical block 211691
attempt to access beyond end of device
hdc: rw=0, want=846772, limit=846748

Does this mean my cdrom is kaput? Is it having problems with reading the outer sectors of the cd especially? Any help will be appreciated.

mritch 08-23-2004 09:56 AM

that means that your drive has a problem reading some data off that drive.
if it's important data try
dd if=/dev/"cdrom" of=/path/to/cdrom.image
if that gives errors to use "readcd" (see manpage of readcd)

if you've got the image written down to your disk loop-mount it to a mountpoint:
mount -t iso9660 -o ro,loop=/dev/loop0 /path/to/cdrom.image /mountpoint/loopcdrom

you should now be able to access /mountpoint/loopcdrom and copy files off there.

sl mritch.

krystianownz 08-27-2004 10:57 PM

Thanks for the helpful reply. Using 'dd' actually made a difference (either that or my cdrom drive has its good and bad days -- won't know for sure until i try cp vs dd a few more times). I'm a little puzzled though. How's dd different than cp when it comes to copying data off cd? I understand that dd copies the raw image of the cd. How's mounting the cd directly and then copying the contents using cp any different? Why would one succeed and the other fail?

mritch 08-28-2004 12:23 AM

dd (and readcd) reads the data "raw" off the drive while cp interacts with the "mounted" filesystem.
such readproblems from cd mostly means a (lightly) damaged cd but could also mean that the hardware has some trouble. you may correct such thing by driving the drive without dma enabled. you can do this with hdparm. read the man page thereof for more info.

sl mritch.

aqm74 12-12-2007 12:19 PM

Hi mritch,

I tried dd to copy a 700MB+ file from my DVD drive to my hard disk. It works, but it never copies the whole file, at times it copies 300MB or even only 3MB! I have tried cp, but it generates input/output error. Even copying through the GUI has not worked. My platform is Ubuntu 7.04 on AMD.
By the way, there is no problem with the DVD itself, it copies smoothly on Windows systems. It is a gunzip file.

Kindly advise, I am puzzled.

Thanks.


All times are GMT -5. The time now is 07:25 PM.