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

Re: How to access Toast-ed multisession CDs?



"Jeremiah Merkl" <merkjj@uleth.ca> writes:

I guess I'd better take my CDs and my MOD, and visit friends whose Macs
still work...

Thank you

-- Andre

> Just for those who have never seen a multi-session HFS disc before, when you
> stick the CD in under a Mac, it actually mounts one volume per session -- 5
> sessions = 5 CD icons appearing on the desktop when you stick it in the drive.
> You have to unmount all the icons for the disc to eject. Strange, but it works.
> 
> Other than that, I can't be any more help. I don't know the specs either. :)
> 
> -JM
> 
> Michael Schmitz wrote:
> 
> > > > mount -t hfs /dev/cdrom should mount the HFS part of the CD. The command
> > > > to mount the ISO portion is left as an exercise...
> > > >
> > > Let me be more precise: I have 5 sessions, and I can mount exactly one
> > > HFS partition, and cannot find the other four sessions. fdisk shows no
> >
> > The other four are also HFS? That's probably not supported.
> >
> > > partition at all, I guess because it is not designed for CD-ROMs?
> >
> > [ISO] CD-ROMs have no partition table. The session information is in the
> > ISO (or other format) data and the kernel only uses the information on
> > the latest session (for CDs where you just add more and more files
> > incrementally) if you specify the default device for all I know.
> >
> > Quoting the source (fs/isofs/inode.c):
> >
> > static int parse_options(char *options, struct iso9660_options * popt)
> > {
> >
> > if (!strcmp(this_char,"session") && value) {
> >
> > [...]
> >                         char * vpnt = value;
> >                         unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
> >                         if(ivalue < 0 || ivalue >99) return 0;
> >                         popt->session=ivalue+1;
> >                 }
> >
> > [...]
> >
> > So there should be a mount option to specify the session to use -
> > mount -o session=0 is session 1 and so on.
> >
> > A bit further, in isofs_get_last_session():0
> >
> > [...]
> >         /* If a minor device was explicitly opened, set session to the
> >          * minor number. For instance, if /dev/hdc1 is mounted, session
> >          * 1 on the CD-ROM is selected. CD_PART_MAX gives access to
> >          * a max of 64 sessions on IDE. SCSI drives must still use
> >          * the session option to mount.
> >          */
> >         if ((MINOR(dev) % CD_PART_MAX) && (MAJOR(dev) != SCSI_CDROM_MAJOR))
> >                 session = MINOR(dev) % CD_PART_MAX;
> > [...]
> >
> > Seems like mounting /dev/hdc gives the last session, and mounting
> > /dev/hdc2 gives session 2.
> >
> > Caveat:
> >
> > * Multisession is legal only with XA disks.
> >  * A non-XA disk with more than one volume descriptor may do it right, but
> >  * usually is written in a nowhere standardized "multi-partition" manner.
> >  * Multisession uses absolute addressing (solely the first frame of the whole
> >  * track is #0), multi-partition uses relative addressing (each first frame of
> >  * each track is #0), and a track is not a session.
> >  *
> >  * A broken CDwriter software or drive firmware does not set new standards,
> >  * at least not if conflicting with the existing ones.
> >  *
> >  * emoenke@gwdg.de
> >
> > How does this apply to HFS? Could not find any mention of 'session' in the
> > HFS source. The HFS filesystem may not be multisession aware. Good luck
> > getting the necessary specs out of Apple or Adaptec.
> >
> > > What's the role of "the ISO portion" here?
> >
> > I thought you was talking about a hybrid HFS/ISO CD. That's the only
> > 'multisession' CD type I've tried.
> >
> >         Michael



Reply to: