LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-22-2004, 09:15 PM   #1
krystianownz
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake Linux
Posts: 5

Rep: Reputation: 0
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.
 
Old 08-23-2004, 09:56 AM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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.
 
Old 08-27-2004, 10:57 PM   #3
krystianownz
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake Linux
Posts: 5

Original Poster
Rep: Reputation: 0
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?
 
Old 08-28-2004, 12:23 AM   #4
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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.
 
Old 12-12-2007, 12:19 PM   #5
aqm74
LQ Newbie
 
Registered: Dec 2007
Location: Lahore, Pakistan
Distribution: Ubuntu 7.04
Posts: 1

Rep: Reputation: 0
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.
 
  


Reply


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
dd: reading `/dev/cdrom': Input/output error jimdaworm Linux - Software 46 10-25-2006 09:43 PM
cp - error reading /mnt/cdrom/mpegav/avseq01.dat input/output error manishsingh4u Linux - General 2 10-17-2005 06:02 AM
cdrom input/output error HadesThunder Linux - Newbie 4 03-30-2004 05:57 PM
can anyone help, /dev/cdrom:input/output error mount speedyhot Linux - Newbie 3 03-01-2004 03:03 PM
Input/output error mounting cdrom ironmc Linux - General 3 07-08-2003 08:35 PM


All times are GMT -5. The time now is 07:27 AM.

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