Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 1998 09:40:51 -0500
From:      "Larry S. Marso" <larry@marso.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: solved: writing multisession cd9660
Message-ID:  <19981026094050.A11787@marso.com>
In-Reply-To: <19981023174049.A3035@marso.com>; from Larry S. Marso on Fri, Oct 23, 1998 at 05:40:49PM -0400
References:  <19981023174049.A3035@marso.com>

next in thread | previous in thread | raw e-mail | index | archive | help
A few corrections, below.

Best regards
-- 
Larry S. Marso
larry@marso.com



On Fri, Oct 23, 1998 at 05:40:49PM -0400, Larry S. Marso wrote:
> 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!

CORRECTION:
I was writing multiple sessions without reprobing the scsi port, or
otherwise reseting the cdrom.  

Provided that you have reprobed the scsi port via:

cdcontrol reset
or
cdrecord -reset dev=2,0

then mkisofs properly reads /dev/cd0c

hence, the appropriate form of the line above is:

mkisofs -R -M /dev/cd0c -C 0,15715 -o cdimage2.raw /dir2

                        ^^ Note that this is the range of the immediately
                           preceeding iso9660 image (available from the
                           cdrecord -msinfo dev=2,0 command), *not* the
			   range from 0 to the end of the most recent image.

There is no reason to retain old iso9660 images, as it should be.

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

You want to specify here the start sector of the final multi-session image
on the cdrom.  If you do so, then you get a ***combined*** image, so that
all the files you have entered in each session are shown in a single,
consolidated directory.  That's what the multisession ISO9660 protocol does
between sessions: it includes the information necessary in each session to
add on the information from the previous session ... so that pointing to
the last session's start sector gives you access to them all.

> LIMITATIONS

Actually, these don't apply.

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



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