I have a multi-session CD whose contents I want to copy to a hard drive. The CD is around 20 years old and it has several parts presenting read issues, so it is a potential candidate for ddrescue.

The problem is that ddrescue doesn't seem to recognize any sessions other than the first one in the CD, just like dd does. Its documentation doesn't even mention multi-session CDs and there seems to be not much information available on the internet about how to do it.

So the question is: how to rescue a multi-session CD using ddrescue or any similar tool?

  • Note: each CD session has its own ISO9660 file system. When you copy an ISO image from a CD, you are actually copying only one of those file systems (the first one, actually). You may use a tool like cdrdao to copy multiple sessions, but don't expect it to rescue hard-to-read data like ddrescue does. That's why I posted this question. – Lucio Paiva Mar 13 '17 at 2:12

I'm afraid you have mentioned the unfortunate answer in your comment: ddrescue does not know how to address individual session. I suspect this is a deliberate choice of the Linux kernel CD-ROM interface: it shows only whatever session it considers relevant. To bypass this, I believe cdrdao does something special which makes it possible for the tool to access individual sessions (for example with the --session) flag.

In my tests, the following yields one big binary file (.bin) and a Table of Contents (.toc) file describing the disk:

cdrdao read-cd --read-raw --datafile data.bin data.toc

It does not retry or check anything, so it's not quite a rescue. But it might be able to rescue mixed-mode CD-ROMs and address individual sessions. If the above does not find all sessions (you can check how many sessions are present with cdrdao disk-info), you can extract individual sessions with:

for session in 1 2 3 [...] ; do
    cdrdao read-cd --read-raw --session $session --datafile data-$session.bin data-$session.toc

The .bin files need to be converted to show up as ISO files, using bchunk:

bchunk data.bin data.toc data

If all goes well, this should create a data.iso for the relevant section of the disk. It might also create a data.ugh file if it fails to convert, and I do not unfortunately know how to handle that case.

  • 2
    I still have those old CDs, so I'll definitely try recovering them again at some point in the near future. I'll let you know if your suggestions work (and then accept your answer). Thanks! – Lucio Paiva Oct 10 '18 at 23:38
  • awesome, thanks. and do let us know if you find out how to make ddrescue work as well! :) – anarcat Oct 11 '18 at 2:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.