File: README.multi

package info (click to toggle)
cdrecord 3%3A1.8-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,964 kB
  • ctags: 7,464
  • sloc: ansic: 48,372; sh: 2,361; makefile: 379; perl: 194; pascal: 39; sed: 4
file content (122 lines) | stat: -rw-r--r-- 3,836 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Creating multi-session CD's Mini Howto FAQ

Multi-session filesystems are a trick that comes from the Kodak photo CD.
The OS mounts the last session that contains the sum of the current session
and all previous sessions.

To test (with Linux):

Create a iso-9660 filesystem image with mkisofs-1.10 or later.
mkisofs is included in the cdrecord release (including
SunOS/Solaris multi-session support)
Use the -R flag to add Rock Ridge extensions (this is important).

Assuming that the CD-R drive is connected to target 2 on the SCSI bus.

Write the first session with:

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

This must be a iso9660 image with Rock Ridge extensions (see above)

Note the number of sectors written and check the disk, it should be mountable.

Next step is to check if cdrecord is able to retrieve the following data:

	1) The first block (sector) number in the first track of the last session
	   This must be '0' in our case.

	2) The next writable address in the unwritten session following the current.
	   This should be the number of sectors written in the first
	   run + ~ 11400 sectors for about 22MB lead out/in

To get this information type:

cdrecord -msinfo dev=2,0

The output should be two numbers separated by a comma.

	e.g.: 0,204562

The first number is (1), the second number is (2).

Create the image for the next session with mkisofs-1.12 or later.
It is included in the cdrecord distribution.

2nd session:
You should create a directory that contains a second directory with data in it
for this purpose.

	e.g.:
		first_dir/
			second_dir/
				file_1
				file_2
				...

call:

On Linux:
mkisofs -o isoimage_2.raw -R  -C xx,yy -M /dev/cdwriter_blk_dev  first_dir

On SunOS:
mkisofs -o isoimage_2.raw -R  -C xx,yy -M target,lun first_dir



The argument of -C is the output of cdrecord -msinfo
-	On Linux, the argument of -M is a device that would allow you to mount 
	the current CD in the CD-writer
-	On SunOS, target and lun refer to the SCSI target and lun of the 
	CD-R device with the same notation as for cdrecord dev=xxx,yyy .


If you want to check, whether mkisofs make evething right, you should create 
another image by using the following command line.

On Linux:
mkisofs -o isoimage_3.raw -R  -C xx,0 -M /dev/cdwriter_blk_dev  first_dir

On SunOS:
mkisofs -o isoimage_2.raw -R  -C xx,0 -M target,lun first_dir

You may check ***this** image by mounting it with my "fbk" on Solaris 
or the loopback driver on Linux.

On Linux type:
	mount isoimage_3.raw -r -t iso9660 -o loop /mnt

On SunOS type:
	mount -r -F fbk -o type=hsfs /dev/fbk0:isoimage_3.raw /mnt

If you list /mnt, you should see all directories that have been in the first 
session and the directory "second_dir". If you try to read a file from the
first session, you will get an I/O error or bad data (depending on the
block address), don't worry about that. If you try to read a file from
the secons session, you will see everything correctly.

To write the second session to CD, call:

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

If you mount this CD, you should see the first session and the second directory 
from 2nd session added to the root directory of the CD.


Additional check:

call:

cdrecord -msinfo dev=2,0

The first number should be the first writable address which was retrieved by the
first call to cdrecord -msinfo after creating the first session.
The second number should be the first number + number of sectors of the second session
+ ~ 11400 sectors.

Note: The first lead-out is 1:30 (6750 sectors) the lead-in is 1:00 (4500 sectors)
All following sessions need only 0:30 for lead-out (2250 sectors), the lead-in
is also 1:00. So in theory, the can be 44 sessions on s 74 minute disk if you
take into account that the minimum track size is 4 seconds.

Joerg Schilling