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

Re: How to access Toast-ed multisession CDs?

> > 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;


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. 


* 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. 


Reply to: