Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 1998 17:40:49 -0400
From:      "Larry S. Marso" <larry@marso.com>
To:        freebsd-questions@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG
Subject:   solved: writing multisession cd9660
Message-ID:  <19981023174049.A3035@marso.com>

next in thread | raw e-mail | index | archive | help
I didn't find a clear explanation in the mailing list archives or
elsewhere of how to create a multisession ISO_9660 CD.

I succeeded as follows:

#1 Create the first session

mkisofs -R -o cdimage.raw /dir1
                          ^^^^^ The directory of files you're backing up
              ^^^^^^^^^^^ The first iso_9660 image file

cdrecord -v -multi dev=2,0 speed=2 cdimage.raw
             ^^^^^ instructs cdrecord to anticipate multiple sessions
                   so that disk fix permits later additions

I've found it's important to **save** the cdimage.raw file (which is
downright inconvenient ... please share with me any alternatives you
uncover),

#2 Create the second image

You need to feed mkisofs information on the most recently recorded session,
in order to create the next session.  This is an *undocumented* mkisofs
command.

cdrecord -msinfo dev=2,0 
   This command outputs the 2048 block information on the most recent
session.  E.g.: 0,15715

mkisofs -R -M cdimage.raw -C 0,15715 -o cdimage2.raw /dir2
                          ^^ An undocumented option.  Include the range of
                             the most recent session

           ^^ mkisofs seems to require that you feed it the actual image
              from the most recent session.  If that's days or weeks ago, 
	      this is pretty inefficient.  I couldn't satisfy mkisofs by
	      offering it the mounted cd session created with cdimage.raw.
              Maybe there's a way to recreate cdimage.raw from the 
              mounted disk?  Solutions appreciated!

You can now:

cdrecord -v -multi dev=2,0 speed=2 cdimage2.raw

#3 Mounting the resulting sessions

You can use

tosha -i 
or 
cdcontrol info

to get the start sectors of the included sessions.  Then mount as follows:

mount_cd9660 -s 15716 /dev/cd0c /mnt

             ^^^^^^^^ This is the start sector of the second session, which
		      is hereby mounted.

Limitations:

- You can't mount more than one session simultaneously

- There's no support I've found for creating some sort of directory of
  all sessions.

Best of luck!

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981023174049.A3035>