Sample Header Ad - 728x90

Block special file for first session of multisession CD

0 votes
0 answers
191 views
I have a multisession CD. The first session is CD audio tracks and the second is an SVCD q.v. "CD Extra" and "Blue book". When played on a CD player, the audio tracks are (until recently) heard; when played on an appropriate video player, the SVCD (until recently) plays. The two "until recently"s in that description highlight my problem -- the disk is starting to degrade and I need to extract the data from it. My go-to for this task is GNU ddrescue . However, ddrescue interacts with a device special file, not a mounted volume. (So the "session=*x*" option to mount for various optical medium filesystems is useless.) For convenience, suppose that /dev/sr0 is the device special file that unhelpfully only represents the last session on the disc (as can be seen from cdrom.c's description of the CDROMMULTISESSION ioctl). Is there a way to * issue an IOCTL to /dev/sr0 to change which session it is bound to, * invoke mknod that will somehow bind the resulting device file to a particular session, or * create a set of block special devices for each session of a multisession disc (similar to sda1, sda2, ..., sda*n* for partitions on a fixed disk)? (For bonus points, is there a standard container for multisession disks that allow the extracted ISOs to be combined so the entire medium is presented to WINE, dosemu, and/or VM software? This would be handy for another multisession CD I have -- session 1 is a Win98SE only (and I mean seriously, ONLY, neither WINE nor WinMe nor subsequent Windowss have been able to run this binary) program that uses the audio tracks in session 2. My last machine that can still run Win98SE is fine, but that won't last forever -- when it fails, I need to be able to present that multisession disk to a VM in a format that works. Maybe there's a sneaky way to abuse loop for this purpose.)
Asked by Eric Towers (236 rep)
Jul 4, 2021, 10:26 PM