[Debburn-devel] CD-Extra issues

Ralf Baechle ralf at linux-mips.org
Wed Dec 3 19:38:54 UTC 2014


On Wed, Dec 03, 2014 at 03:18:37PM +0100, Thomas Schmitt wrote:

> > $ mkisofs -o cd/mp3.iso -C 150,291114 -r -J cd/*.mp3
> > $ wodim cd/mp3.iso
> > dd if=/dev/sr0 returns an error without reading any data. 
> 
> The audio sectors of a CD cannot be read via the block device
> driver. So dd righteously fails on the attempt to read the CD
> from start.

Ah.  Knowing that the audio tracks are not readiable I was somehow assuming
the audio tracks to be ignored and the data session thus to show up starting
at block zero in the block device.

> What happens when you let it start reading at block 291114
> where your ISO was written ? 
> 
>   dd if=/dev/sr0 bs=2048 skip=291114 of=iso_plus_trailing_trash.iso
> 
> It is a bit questionable whether block size and skip count
> will make it start at LBA 291114 of the CD. The size of
> audio sectors is 2352, but i bet that the block device
> driver does not know this. (If bs=2048 does not work, try
> bs=2352 .)

Block size 2048 is working and indeed I can correctly read out the entire
iso image that way.

dd if=/dev/sr0 bs=2048 skip=291114 count=$((89114624/2048)) | sha1sum

The checksum matches that of of the ISO image that I burned.

> If this yields the expected amount of data, then try to mount
> the ISO from CD with the block offset given as parameter sbsector=.
> E.g. as superuser:
> 
>   mkdir /mnt/iso
>   mount -t iso9660 -o sbsector=291114 /dev/sr0 /mnt/iso
>   ls -l /mnt/iso

Mounting still doesn't work.  The mount man page documents the block size
to default to 1024 so I tried to add block=2048.  Nor does throwing in
a session=x option make any difference.

The kernel messages are interesting.

  mount -t iso9660 -o session=2 /dev/sr0 /mnt

yields:

[238413.898899] ISOFS: Session 3 start 38778 type 0
[238413.898917] ISOFS: Invalid session number or type of track
[238413.898922] ISOFS: Invalid session number
[238413.898930] ISO 9660 Extensions: Microsoft Joliet Level 3
[238413.898940] ISOFS: Interleaved files not (yet) supported.
[238413.898942] ISOFS: File unit size != 0 for ISO file (18642688).
[238413.898947] ISOFS: changing to secondary root
[238413.898986] ISOFS: Interleaved files not (yet) supported.
[238413.898995] ISOFS: File unit size != 0 for ISO file (18642816).
[238413.899011] isofs_fill_super: root inode is not a directory. Corrupted media?

Note the first line.  I tried to mount session 2 not one.  And 38778 is
the starting block of audio track 3, not the 2nd session.  Let's see if
we can fool it to do the right thing.

  mount -t iso9660 -o session=17 /dev/sr0 /mnt

yields:

[238634.103799] ISOFS: Session 18 start 291114 type 4
[238634.103808] ISO 9660 Extensions: Microsoft Joliet Level 3
[238634.103815] ISOFS: Interleaved files not (yet) supported.
[238634.103817] ISOFS: File unit size != 0 for ISO file (18642688).
[238634.103820] ISOFS: changing to secondary root
[238634.103831] ISOFS: Interleaved files not (yet) supported.
[238634.103834] ISOFS: File unit size != 0 for ISO file (18642816).
[238634.103836] isofs_fill_super: root inode is not a directory. Corrupted media?

http://ubuntuforums.org/archive/index.php/t-1088919.html describes an
issue that could be the same.

Time to dive into the kernel code?

> Have a nice day :)

Thanks & have a nice evening :-)

  Ralf



More information about the Debburn-devel mailing list