3

I am trying to use the existing Linux driver system to effectively dump the data of CDROMs.

As an example, if I pop in a "normal" CDROM disc of software and run the command

cat /dev/sr0

then the output is a bunch of raw data from the disc - which is great.

However, some other types of CDs result in IO errors after just a little data.

Some research has led me to understand that data is being read by default in "Mode 1". (Info on format/structure can be found here: https://en.wikipedia.org/wiki/CD-ROM#CD-ROM_format)

For discs with data in Mode 2, what would it take to be able to read them? Are there any driver or kernel settings to change the mode?

Note: There are other programs to accomplish this such as cdrdao, but my question is for how to do it natively.

Update 1: Some potential leads:

  • It seems XA mode have at least 2 partitions. forum.doom9.org/archive/index.php/t-89769.html – Rui F Ribeiro Jun 6 '16 at 15:03
  • Have you tried dd if=/dev/sr0 and see if it results in IO errors as well – Hesham Ahmed Jun 7 '16 at 21:22
  • 1
    There used to be a v2.4-v2.6 kernel module CDfs, that could mount both disk sessions of an XA CD. Running it would require either booting an old linux distro, or perhaps running an old distro from an emulator. – agc Jun 10 '16 at 0:52
  • The mode of each sector is defined in the seventeenth byte. Enabling the XA check will only cause Linux to read that byte and decide it's not a mode2/XA sector. (The actual data mode 2 work is in elixir.bootlin.com/linux/latest/ident/sr_read_cd; it's usually called such that the cd-drive determines the data mode.) – Arthur2e5 Mar 28 '18 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.