[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reading the raw iso from a CD-Extra (multisession CD)

Edmund GRIMLEY EVANS <please_reply_to_the_list@rano.org>:

> I've also tried reading the second session with a cdrdao and a CD
> writer. According to od there's a ISO file system with an offset, but
> I can't loop mount it (obviously I've tried subtracting the offset) so
> I don't know whether this data is good or not:

There are two reasons why it's not possible to loop-mount the data
from cdrdao.

Firstly, the raw data has 2336-byte sectors in which only 2048 bytes
are part of the ISO file system. The remaining bytes should be used
for error-correcting, but one can simple throw them away:

$ cdrdao read-cd --session 2 --datafile session2.bin session2.toc
$ perl -e 'while (read(STDIN, $d, 2336)) { print substr($d, 8, 2048); }' < session2.bin > session2.iso

Secondly, the sector numbers in the file system refer to sectors of
the original CD rather than sectors of session2.iso. I don't know of a
utility for rewriting them so that the file can be loop-mounted or
written to an ordinary CD, but you can at least get a directory
listing by using isoinfo with an offset:

isoinfo -i session2.iso -N 204345 -l

I obtained the offset by looking at a hex dump and referring to

The next interesting problem is that with the CD I'm looking at 6 of
the 8 files in the PICTURES/ directory are not readable. I can't see
anything wrong in the .iso, so it might be because of the
error-correcting codes ...

Reply to: