Reading Windows CD on Linux 2.4.6
Hello:
I sent the following message to the kernel newbies mailing list, and it was suggested that I send it to the kernel mailing list. I am not a subscriber of this mailing list, so I would appreciate any replies being sent to me directly.
-----------------------
I have found that after upgrading from 2.2.19 to 2.4.6, I can no longer read CD-ROMs that were created under Windows. Since they work fine on 2.2.19, I assume there is some configuration option that has changed, but I did not see anything that looked suspicious.
I can mount the CD and list the files on it, but when I try to access one of the files on it, I get an IO error.
When I created the disk on Windows, I selected the option to "Organize the disc so it can be read in most standard CD-ROM drives...". On Linux, I selected the kernel options for ISO 9660 and the Joliet extensions.
Does anyone have any ideas about what I am doing wrong?
Thanks,
Bruce
Signature · 3 lines
Bruce Blinn 408-615-9100 Mission Critical Linux, Inc. [email protected] www.MissionCriticalLinux.com
Hi,
Can you generate a cdrom image which has that problem (and less than 50 megs) in order to test?
thanks,
Masoud
Quoted 27 lines · Bruce Blinn
Hello:
I sent the following message to the kernel newbies mailing list, and it was suggested that I send it to the kernel mailing list. I am not a subscriber of this mailing list, so I would appreciate any replies being sent to me directly.
-----------------------
I have found that after upgrading from 2.2.19 to 2.4.6, I can no longer read CD-ROMs that were created under Windows. Since they work fine on 2.2.19, I assume there is some configuration option that has changed, but I did not see anything that looked suspicious.
I can mount the CD and list the files on it, but when I try to access one of the files on it, I get an IO error.
When I created the disk on Windows, I selected the option to "Organize the disc so it can be read in most standard CD-ROM drives...". On Linux, I selected the kernel options for ISO 9660 and the Joliet extensions.
Does anyone have any ideas about what I am doing wrong?
Thanks,
Bruce
Quoted 7 lines · Masoud Sharbiani
Hi,
Can you generate a cdrom image which has that problem (and less than 50 megs) in order
to test?
thanks,
Masoud
Hi Masoud:
I created a new CD that only contains linux-2.4.6.tar.gz (23Mb), and this CD duplicates my problem. On 2.2.19, I can copy the tar file from the CD, and it is the same as the original, but when using 2.4.6, I get an IO error.
However, when I tried to copy the CD image to a file, I get the following IO error regardless of which kernel I use.
# dd if=/dev/cdrom of=/tmp/cd.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records out
Does this shed any more light on what I am doing wrong. Is there another way for me to create a CD image for you?
Thanks,
Bruce
Signature · 5 lines
Bruce Blinn 408-615-9100 Mission Critical Linux, Inc. [email protected] www.MissionCriticalLinux.com The beatings will stop when morale improves.
On Mon, 17 Sep 2001, Bruce Blinn wrote:
[SNIPPED...]
Just do cp /dev/cdrom /tmp/foo. ^C out when you think you have enough, then use dd to copy a small portion of the image file.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
Quoted 7 lines · Richard B. Johnson
On Mon, 17 Sep 2001, Bruce Blinn wrote:
[SNIPPED...]Just do
cp /dev/cdrom /tmp/foo. ^C out when you think you have enough, then useddto copy a small portion of the image file.
Here are the results of the methods that were suggested for producing a CD image. They all seem to fail at the same place because the resulting file is the same size.
# dd if=/dev/cdrom of=/tmp/cd1.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records out
# dd if=/dev/cdrom of=/tmp/cd2.iso bs=2k dd: /dev/cdrom: Input/output error 360+0 records in 360+0 records out
# cp /dev/cdrom /tmp/cd3.iso cp: /dev/cdrom: Input/output error
# ls -l /tmp/cd* -rw------- 1 root root 737280 Sep 17 14:09 /tmp/cd1.iso -rw------- 1 root root 737280 Sep 17 14:10 /tmp/cd2.iso -rw------- 1 root root 737280 Sep 17 14:11 /tmp/cd3.iso
Thanks,
Bruce
Signature · 5 lines
Bruce Blinn 408-615-9100 Mission Critical Linux, Inc. [email protected] www.MissionCriticalLinux.com Asking if computers can think is like asking if submarines can swim.
Quoted 8 lines
Here are the results of the methods that were suggested for producing a CD image. They all seem to fail at the same place because the resulting file is the same size.
# dd if=/dev/cdrom of=/tmp/cd1.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records out
Bad CD image - or that is all the data on it. If its bad blocks you can tell dd to continue past bad blocks and pad them with zero - handy for rescueing uncompressed tape backups
Quoted 5 lines · Alan Cox
Quoted 5 lines
Here are the results of the methods that were suggested for producing a CD image. They all seem to fail at the same place because the resulting file is the same size.
Quoted 8 lines
Quoted 4 lines
# dd if=/dev/cdrom of=/tmp/cd1.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records outBad CD image - or that is all the data on it. If its bad blocks you can tell dd to continue past bad blocks and pad them with zero - handy for rescueing uncompressed tape backups
I do not think the disk is missing data or that there are any bad blocks. The reason I say this is because I can access every file on the disk when the CD is mounted as an iso9660 file system on a 2.2.19 kernel. I compared the files with the originals and they are identical.
The only reason I found out dd would not copy the disk is because Masoud asked for an image.
I tried using dd to copy a much larger CD (150 Mb) and it fails at the same place and the resulting file is the same size (737280 bytes). So it fails long before the end of the data.
By the way, dd works fine when copying other CDs that were not created under Windows.
Thanks,
Bruce
Quoted 19 lines · Bruce Blinn
Date: Mon, 17 Sep 2001 15:28:42 -0700
From: Bruce Blinn <[email protected]>
To: Alan Cox <[email protected]>
Cc: [email protected],Masoud Sharbiani <[email protected]>, [email protected]Subject: Re: Reading Windows CD on Linux 2.4.6
Quoted 10 lines · Alan Cox
Quoted 9 lines
Here are the results of the methods that were suggested for producing a CD image. They all seem to fail at the same place because the resulting file is the same size.
# dd if=/dev/cdrom of=/tmp/cd1.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records out
Quoted 8 lines
Quoted 3 lines
Bad CD image - or that is all the data on it. If its bad blocks you can tell dd to continue past bad blocks and pad them with zero - handy for rescueing uncompressed tape backups
I do not think the disk is missing data or that there are any bad blocks. The reason I say this is because I can access every file on the disk when the CD is mounted as an iso9660 file system on a 2.2.19 kernel. I compared the files with the originals and they are identical.
Maybe it is not a single session disk?
Could you try
cdrecord -toc dev=x,y
where x,y are numbers returned for your SCSI (either native or emulated) device by
cdrecord -scanbus
I have never played with multisession disks so far, but I don't think dd could read anything more than the first track ...
Quoted 6 lines
The only reason I found out dd would not copy the disk is because Masoud asked for an image.
I tried using dd to copy a much larger CD (150 Mb) and it fails at the same place and the resulting file is the same size (737280 bytes). So it fails long before the end of the data.
This would again make me suspect Win software does not produce single-session disks ...
Quoted 7 lines
By the way, dd works fine when copying other CDs that were not created under Windows.
Thanks,
Bruce
Best regards,
Wojtek
Quoted 29 lines · Wojtek Pilorz
Quoted 5 lines
I do not think the disk is missing data or that there are any bad blocks. The reason I say this is because I can access every file on the disk when the CD is mounted as an iso9660 file system on a 2.2.19 kernel. I compared the files with the originals and they are identical.
Maybe it is not a single session disk?
Could you try
cdrecord -toc dev=x,y
where x,y are numbers returned for your SCSI (either native or emulated) device by
cdrecord -scanbusI have never played with multisession disks so far, but I don't think dd could read anything more than the first track ...
Quoted 6 lines
The only reason I found out dd would not copy the disk is because Masoud asked for an image.
I tried using dd to copy a much larger CD (150 Mb) and it fails at the same place and the resulting file is the same size (737280 bytes). So it fails long before the end of the data.This would again make me suspect Win software does not produce single-session disks ...
Quoted 4 lines
By the way, dd works fine when copying other CDs that were not created under Windows.
Quoted 6 lines
Quoted 3 lines
Thanks,
BruceBest regards,
Wojtek
When I run the cdrecord -scanbus command I get the following error; presumably because my CD is not SCSI???
# cdrecord -scanbus Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling cdrecord: No such file or directory. Cannot open SCSI driver. cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
I suspect you are right about it being a multi-session disk. That sounds familiar. I just double checked, and I cannot find an option in my Windows software to force a single session disk. However, if the disk is multi-session, why can the 2.2.19 kernel could read it?
Thanks
Bruce
Signature · 3 lines
Bruce Blinn 408-615-9100 Mission Critical Linux, Inc. [email protected] www.MissionCriticalLinux.com
Quoted 6 lines · Wojtek Pilorz
Could you try
cdrecord -toc dev=x,y
where x,y are numbers returned for your SCSI (either native or emulated) device by
cdrecord -scanbus
I think I finally got the cdrecord command to work (thanks Tobias). By the way, after today, I will be on vacation until Monday, so if I don't reply to messages, don't think that it is that I do not appreciate all the help that I am getting.
Thanks,
Bruce
# cdrecord -scanbus
Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling
Using libscg version 'schily-0.1'
scsibus0:
cdrecord: Warning: controller returns wrong size for CD capabilities
page.
0,0,0 0) 'Lite-On ' 'LTN483S 48x Max ' 'PD02' Removable
CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
# cdrecord -toc dev=0,0,0
Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Using libscg version 'schily-0.1'
cdrecord: Warning: controller returns wrong size for CD capabilities
page.
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'Lite-On '
Identifikation : 'LTN483S 48x Max '
Revision : 'PD02'
Device seems to be: Generic mmc CD-ROM.
cdrecord: Warning: controller returns wrong size for CD capabilities
page.
cdrecord: Warning: controller returns wrong size for CD capabilities
page.
cdrecord: Warning: controller returns wrong size for CD capabilities
page.
Using generic SCSI-3/mmc CD driver (mmc_cd).
Driver flags : SWABAUDIO
first: 1 last 2
track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 6 mode: 2
track: 2 lba: 512 ( 2048) 00:08:62 adr: 1 control: 5 mode: 2
track:lout lba: 14144 ( 56576) 03:10:44 adr: 1 control: 5 mode:
-1
#Quoted 4 lines · Bruce Blinn
Date: Tue, 18 Sep 2001 14:17:58 -0700
From: Bruce Blinn <[email protected]>
To: Wojtek Pilorz <[email protected]>
Cc: Alan Cox <[email protected]>, [email protected],
Quoted 11 lines
Masoud Sharbiani <[email protected]>, [email protected]Subject: Re: Reading Windows CD on Linux 2.4.6
Quoted 6 lines · Wojtek Pilorz
Could you try
cdrecord -toc dev=x,y
where x,y are numbers returned for your SCSI (either native or emulated) device by
cdrecord -scanbus
The result of this command (at the end of your mail) clearly indicates that this is a multi-session disk, do you can't expect to be able to copy its contents with dd;
Why kernel 2.2.19 is able to read this disk, while 2.4.6 cannot is another problem. Either 2.4.6 cannot handle multi-session disks (I would be surprised if that would be case, although I have not checked), or maybe the Windows CD-mastering/recording software you are using makes some departure from standards, which is tolerated by 2.2.19, but not by 2.4.6; You might want to look at your /var/log/messages file and possibly check whether it is possible to get more debugging output from the kernel (cdrom driver?)
Quoted 18 lines
I think I finally got the cdrecord command to work (thanks Tobias). By the way, after today, I will be on vacation until Monday, so if I don't reply to messages, don't think that it is that I do not appreciate all the help that I am getting.
Thanks,
Bruce# cdrecord -scanbus Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling Using libscg version 'schily-0.1' scsibus0: cdrecord: Warning: controller returns wrong size for CD capabilities page. 0,0,0 0) 'Lite-On ' 'LTN483S 48x Max ' 'PD02' Removable CD-ROM 0,1,0 1) *
[...]
Quoted 17 lines
# cdrecord -toc dev=0,0,0 Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling scsidev: '0,0,0' scsibus: 0 target: 0 lun: 0 Using libscg version 'schily-0.1' cdrecord: Warning: controller returns wrong size for CD capabilities page. Device type : Removable CD-ROM Version : 0 Response Format: 1 Vendor_info : 'Lite-On ' Identifikation : 'LTN483S 48x Max ' Revision : 'PD02' Device seems to be: Generic mmc CD-ROM. cdrecord: Warning: controller returns wrong size for CD capabilities page. cdrecord: Warning: controller returns wrong size for CD capabilities
Quoted 8 lines
page. cdrecord: Warning: controller returns wrong size for CD capabilities page. Using generic SCSI-3/mmc CD driver (mmc_cd). Driver flags : SWABAUDIO first: 1 last 2 track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 6 mode: 2 track: 2 lba: 512 ( 2048) 00:08:62 adr: 1 control: 5 mode: 2
======== ^^^^^^ ==============
Quoted 4 lines
track:lout lba: 14144 ( 56576) 03:10:44 adr: 1 control: 5 mode:
-1
#
Followup to: <[email protected]> By author: Bruce Blinn <[email protected]> In newsgroup: linux.dev.kernel
Quoted 6 lines
I do not think the disk is missing data or that there are any bad blocks. The reason I say this is because I can access every file on the disk when the CD is mounted as an iso9660 file system on a 2.2.19 kernel. I compared the files with the originals and they are identical.
Quoted 9 lines
The only reason I found out dd would not copy the disk is because Masoud asked for an image.
I tried using dd to copy a much larger CD (150 Mb) and it fails at the same place and the resulting file is the same size (737280 bytes). So it fails long before the end of the data.By the way, dd works fine when copying other CDs that were not created under Windows.
This almost seems to imply they're recording the data noncontiguously, which would be totally bizarre but not totally impossible.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>
Quoted 15 lines · H. Peter Anvin
Followup to: <[email protected]> By author: Bruce Blinn <[email protected]> In newsgroup: linux.dev.kernelQuoted 12 lines
I do not think the disk is missing data or that there are any bad blocks. The reason I say this is because I can access every file on the disk when the CD is mounted as an iso9660 file system on a 2.2.19 kernel. I compared the files with the originals and they are identical.
The only reason I found out dd would not copy the disk is because Masoud asked for an image.
I tried using dd to copy a much larger CD (150 Mb) and it fails at the same place and the resulting file is the same size (737280 bytes). So it fails long before the end of the data.
Quoted 7 lines
Quoted 3 lines
By the way, dd works fine when copying other CDs that were not created under Windows.
This almost seems to imply they're recording the data noncontiguously, which would be totally bizarre but not totally impossible.
I've seen commercial CD do this. Maybe that dd trick to skip empty parts and pad with zeros would work...
Quoted 5 lines · Bruce Blinn
Quoted 4 lines · Richard B. Johnson
On Mon, 17 Sep 2001, Bruce Blinn wrote:
[SNIPPED...]
Quoted 8 lines
Quoted 3 lines
Just do
cp /dev/cdrom /tmp/foo. ^C out when you think you have enough, then useddto copy a small portion of the image file.Here are the results of the methods that were suggested for producing a CD image. They all seem to fail at the same place because the resulting file is the same size.
Okay. That's good. The guy that asked to get the image to find out what was happening can probably use a small piece of that to find out what is going on. It probably is a CD data + Music image where the first readable stuff is data, followed by a music image.
You can try cdda2wav -D0,4,0, -B. You will probably get some *.wav files.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
Quoted 8 lines · Richard B. Johnson
Okay. That's good. The guy that asked to get the image to find out what was happening can probably use a small piece of that to find out what is going on. It probably is a CD data + Music image where the first readable stuff is data, followed by a music image.
You can try cdda2wav -D0,4,0, -B. You will probably get some *.wav files.
I cannot find the cdda2wav command on my system. Also, my disks only have data on them, not music.
Thanks,
Bruce
Signature · 3 lines
Bruce Blinn 408-615-9100 Mission Critical Linux, Inc. [email protected] www.MissionCriticalLinux.com
Quoted 7 lines · Bruce Blinn
Quoted 6 lines · Richard B. Johnson
Okay. That's good. The guy that asked to get the image to find out what was happening can probably use a small piece of that to find out what is going on. It probably is a CD data + Music image where the first readable stuff is data, followed by a music image.
Quoted 9 lines
Quoted 2 lines
You can try cdda2wav -D0,4,0, -B. You will probably get some *.wav files.
I cannot find the cdda2wav command on my system. Also, my disks only have data on them, not music.
Thanks,
Bruce
The point is that these M$ disks just might be multi-session which explains a lot. If so, the music-extraction software cited just might show it without having to look further.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
Quoted 5 lines · Richard B. Johnson
Quoted 2 lines · Bruce Blinn
Quoted 1 line · Richard B. Johnson
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Okay. That's good. The guy that asked to get the image to find out what was happening can probably use a small piece of that to find out what is going on. It probably is a CD data + Music image where the first readable stuff is data, followed by a music image.
You can try cdda2wav -D0,4,0, -B. You will probably get some *.wav files.
I downloaded a copy of cdda2wav and was able to run it. Here is the output:
# cdda2wav -D0,0,0 -B
Type: ROM, Vendor 'Lite-On ' Model 'LTN483S 48x Max ' Revision 'PD02'
cdda2wav:
Warning: controller returns wrong size for CD capabilities page.
MMC+CDDA
724992 bytes buffer memory requested, 4 buffers, 75 sectors
#Cdda2wav version 1.11a07_linux_2.4.6-cdrom_i686_i686 real time sched.
soundcard support
DATAtrack recorded copy-permitted tracktype
1- 1 uninterrupted yes data
DATAtrack recorded copy-permitted tracktype
2- 2 incremental no data
Table of Contents: total tracks:2, (total time 3:10.44)
1.[ 0:06.62], 2.[ 3:01.57],Table of Contents: starting sectors
1.( 0), 2.( 512), lead-out( 14144)
CDINDEX discid: 9hOr8JVIL3ybrw8DyqAsew8V_MM-
CDDB discid: 0x0a00bc02
CD-Text: not detected
CD-Extra: not detected
This disk has no audio tracks
On Tue, 18 Sep 2001, Bruce Blinn wrote:
[SNIPPED...]
Quoted 18 lines
I downloaded a copy of cdda2wav and was able to run it. Here is the output:
# cdda2wav -D0,0,0 -B Type: ROM, Vendor 'Lite-On ' Model 'LTN483S 48x Max ' Revision 'PD02' cdda2wav: Warning: controller returns wrong size for CD capabilities page. MMC+CDDA 724992 bytes buffer memory requested, 4 buffers, 75 sectors #Cdda2wav version 1.11a07_linux_2.4.6-cdrom_i686_i686 real time sched. soundcard support DATAtrack recorded copy-permitted tracktype 1- 1 uninterrupted yes data DATAtrack recorded copy-permitted tracktype 2- 2 incremental no data Table of Contents: total tracks:2, (total time 3:10.44) 1.[ 0:06.62], 2.[ 3:01.57],
Quoted 8 lines
Table of Contents: starting sectors
1.( 0), 2.( 512), lead-out( 14144)
CDINDEX discid: 9hOr8JVIL3ybrw8DyqAsew8V_MM-
CDDB discid:0x0a00bc02
CD-Text: not detected
CD-Extra: not detected
This disk has no audio tracks
Okay. You can see that it was recorded in some "non-standard" way. "Warning: controller returns wrong size for CD capabilities page." However, it should not hurt. This shows that there are only two tracks of data. The rest has never been recorded. Therefore, you have an ISO9660 image that doesn't fill the whole CD. This seems okay.
You, therefore, can't get a binary image of the whole CD because only the first two tracks has been written. A CD isn't "formatted" like a hard-disk. An unwritten CD doesn't contain anything that will even synchronize read electronics.
This CD should mount normally under Linux and have no missing or unreadable files. However, you can't expect to raw-read 700 Mb of data from the physical media.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
Quoted 10 lines
# dd if=/dev/cdrom of=/tmp/cd1.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records out# dd if=/dev/cdrom of=/tmp/cd2.iso bs=2k dd: /dev/cdrom: Input/output error 360+0 records in 360+0 records out
Quoted 7 lines
# cp /dev/cdrom /tmp/cd3.iso cp: /dev/cdrom: Input/output error# ls -l /tmp/cd* -rw------- 1 root root 737280 Sep 17 14:09 /tmp/cd1.iso -rw------- 1 root root 737280 Sep 17 14:10 /tmp/cd2.iso -rw------- 1 root root 737280 Sep 17 14:11 /tmp/cd3.iso
AFAIK, that's normal because when a cd is burned, the last 2 sectors are always unreadable.
Signature · 1 line
Lab tests show that use of micro$oft causes cancer in lab animals
Quoted 24 lines · Bruce Blinn
Quoted 7 lines · Masoud Sharbiani
Hi,
Can you generate a cdrom image which has that problem (and less than 50 megs) in order
to test?
thanks,
MasoudHi Masoud:
I created a new CD that only contains linux-2.4.6.tar.gz (23Mb), and this CD duplicates my problem. On 2.2.19, I can copy the tar file from the CD, and it is the same as the original, but when using 2.4.6, I get an IO error.
However, when I tried to copy the CD image to a file, I get the following IO error regardless of which kernel I use.
# dd if=/dev/cdrom of=/tmp/cd.iso dd: /dev/cdrom: Input/output error 1440+0 records in 1440+0 records out
Quoted 5 lines
Does this shed any more light on what I am doing wrong. Is there another way for me to create a CD image for you?
Thanks,
Bruce
Do you get any errors when you loopback mount the cd.iso file?