1 Creating multi-session CDs/DVDs Mini Howto FAQ
3 Multi-session filesystems are a trick that comes from the Kodak photo CD.
4 The OS mounts the last session that contains the sum of the current session
5 and all previous sessions.
9 - create a iso-9660 filesystem image with genisoimage.
10 - genisoimage is included in the cdrkit release.
11 - use the -R flag to add Rock Ridge extensions (this is important).
13 Assuming that the CD-R drive is connected to target 2 on the SCSI bus.
15 Write the first session with:
17 wodim -v speed=2 dev=2,0 -eject -multi isoimage.raw
19 Note that all Sony drives do no support XA2 disks in firmware - read README.sony
22 This must be a iso9660 image with Rock Ridge extensions (see above)
24 Note the number of sectors written and check the disk, it should be mountable.
26 Next step is to check if wodim is able to retrieve the following data:
28 1) The first block (sector) number in the first track of the last session
29 This must be '0' in our case.
31 2) The next writable address in the unwritten session following the current.
32 This should be the number of sectors written in the first
33 run + ~ 11400 sectors for about 22MB lead out/in
35 For the first additional session this is 11250 sectors lead-out/lead-in
36 overhead + 150 sectors for the pre-gap of the first track after the
37 lead-in = 11400 sectors.
39 For all further session this is 6750 sectors lead-out/lead-in
40 overhead + 150 sectors for the pre-gap of the first track after the
41 lead-in = 6900 sectors.
43 To get this information type:
47 The output should be two numbers separated by a comma.
51 The first number is (1), the second number is (2).
54 You should create a directory that contains a second directory with data in it
67 genisoimage -o isoimage_2.raw -R -C xx,yy -M /dev/cdwriter_blk_dev first_dir
70 genisoimage -o isoimage_2.raw -R -C xx,yy -M target,lun first_dir
72 Note that the name "first_dir" is not important.
74 If you still keep the old raw image of the first session and there is only
75 one previous session on the CD you may also call:
77 genisoimage -o isoimage_2.raw -R -C xx,yy -M isoimage.raw first_dir
80 The argument of -C is the output of wodim -msinfo
81 - On Linux, the argument of -M is a device that would allow you to mount
82 the current CD in the CD-writer
83 - On SunOS, target and lun refer to the SCSI target and lun of the
84 CD-R device with the same notation as for wodim dev=xxx,yyy .
86 Note that you can also use the -msifile=... option of wodim to store this data
87 in a reliable way. This is usefull for scripting.
89 If you want to check, whether genisoimage make everything right, you should create
90 another image by using the following command line.
93 genisoimage -o isoimage_2.raw -R -C xx,0 -M /dev/cdwriter_blk_dev first_dir
96 genisoimage -o isoimage_2.raw -R -C xx,0 -M target,lun first_dir
98 Where xx is the first number of the pair returned by wodim -msinfo
100 You may check ***this** image by mounting it with my "fbk" on Solaris
101 or the loopback driver on Linux.
104 mount isoimage_2.raw -r -t iso9660 -o loop /mnt
107 mount -r -F fbk -o type=hsfs /dev/fbk0:isoimage_3.raw /mnt
109 For Solaris 8 and later you may also use the Sun lofi driver (see README.sun-lofi)
111 If you list /mnt, you should see all directories that have been in the first
112 session and the directory "second_dir". If you try to read a file from the
113 first session, you will get an I/O error or bad data (depending on the
114 block address), don't worry about that. If you try to read a file from
115 the second session, you will see everything correctly.
117 To write the second session to CD, call:
119 wodim -v speed=2 dev=2,0 -eject -multi isoimage_2.raw
121 If you mount this CD, you should see the first session and the second directory
122 from 2nd session added to the root directory of the CD.
129 wodim -msinfo dev=2,0
131 The first number should be the first writable address which was retrieved by the
132 first call to wodim -msinfo after creating the first session.
133 The second number should be the first number + number of sectors of the second session
136 Note: The first lead-out is 1:30 (6750 sectors) the lead-in is 1:00 (4500 sectors)
137 All following sessions need only 0:30 for lead-out (2250 sectors), the lead-in
138 is also 1:00. So in theory, the can be 44 sessions on s 74 minute disk if you
139 take into account that the minimum track size is 4 seconds.
141 The total amount of the overhead is 11250 + 150 sectors for the first additional
142 session and 6750 + 150 sectors for all subsequent sessions.
143 The 150 additional sectors are the pre-gap sectors for the first track after
146 Some notes on multi-session CD's that contain only Joliet but no Rock Ridge:
148 Joliet is a really bad idea in general:
150 - There is no way to find a relation between a ISO-9660 name and a Joliet
151 name. If the file has a size, you may try to match the starting sector #
152 but if the size in 0 it's impossible.
155 - Joliet does not allow long filenames (it limits names to 64 chars).
157 - Joliet does not allow all (usually used) characters in filenames.
159 All code points between (00)(00) and (00)(1F), inclusive. (Control Characters)
160 (00)(2A) '*'(Asterisk)
161 (00)(2F) '/' (Forward Slash)
163 (00)(3B) ';' (Semicolon)
164 (00)(3F) '?' (Question Mark)
165 (00)(5C) '\' (Backslash)
167 While '/' is not a real problem ;-) other characters may cause trouble.
169 All notes above prevent you from doing reliable multi-session if the CD does
170 only contain Joliet but des not contain Rock Ridge attributes.
172 In addition, please read README.joliet in the genisoimage directory.
174 This is the answer to a commonly asked question is why can't I continue a
175 multisession CD that has been started on a Microsoft system using genisoimage.
178 Note: It is not possible to create a multi-session HFS CD. If you create
179 a multi-session CD using any of the HFS options, then each new HFS
180 session will ignore HFS files from any previous sessions. A warning will
181 be printed if you attempt this. However, if you use the '-part' option to
182 genisoimage for each session you create, then each session will appear as
183 separate volumes when mounted on a Mac. In this case, it is worth using the
184 '-V' or '-hfs-volid' option to give each session a unique volume name,
185 otherwise each "volume" will appear on the Desktop with the same name.
190 Edited for cdrkit by Christian Fromme <kaner@strace.org> and Eduard Bloch
193 This describes the programs as shipped with cdrkit, a spinoff from the
194 cdrtools project. However, the cdrtools developers are no longer
195 involved in the development of this spinoff and therefore shall not
196 be made responsible for any problem caused by it. Do not try to get
197 support for this program by contacting the original authors.
199 If you have support questions, send them to
201 debburn-devel@lists.alioth.debian.org
203 If you have definitely found a bug, send a mail to this list or to
205 submit@bugs.debian.org
207 writing at least a short description into the Subject and "Package: cdrkit"