xorrecord: ExIsoMulti
6.7 Write multiple ISO 9660 sessions
====================================
This is possible with all media except minimally blanked DVD-RW and
DVD-R DL, which cannot do multi-session.
The first session is written like in the previous example, except that
option -multi is used. It will contain the files of hard disk directory
./tree1 under the ISO 9660 directory /dir1:
$ xorrisofs -o image_1.iso -J -graft-points /dir1=./tree1
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-multi -grow_overwriteable_iso \
blank=as_needed -eject padsize=300k image_1.iso
For the second session xorrisofs needs to know the -msinfo numbers of
the medium. Further it will read data from the medium by using the
system's read-only CD-ROM driver.
It is advised to load the tray manually or via dd by the CD-ROM driver,
rather than letting xorrecord do this by its own SCSI driver. Many
system CD-ROM drivers do not take notice of xorrecord's activities.
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
Now get the -msinfo numbers:
$ m=$(xorrecord dev=/dev/sr0 -msinfo)
and use them with xorrisofs to add ./tree2 to the image as /dir2:
$ xorrisofs -M /dev/sr0 -C $m -o image_2.iso \
-J -graft-points /dir2=./tree2
Now burn the new session onto the same medium. This time without
blanking:
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-multi -grow_overwriteable_iso \
-eject padsize=300k image_2.iso
Operating systems which mount this medium will read the superblock of
the second session and show both directories /dir1 and /dir2.