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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
This is from "Eduardo M. A. M. Mendes" <mendes@mgconecta.com.br>
Creating multi-session CD's with dir=/ feature Micro Howto
This mini-howto was written as guide to help me to create multi-session CD's
with the possibility of determining the location of files. I hope
that this guide helps you too.
In order to use wodim it is first necessary to define to which scsi bus
the cd-writer is connected. In my case the setup is dev=0,3,0. It is also
interesting to have a separate directory in which all image files can
be dumped: /home/cdsource is the directory I chose for dumping the images.
The best way to understand how to create multi-session cds is to read
README.multi. Most of what is going to be said here is based on that
README file and on the help of several wodim users.
This Micro Howto is divided into two parts as follows:
Example a) A dir/=/dir1/dir2 example
Example b) A dir1/dir2/=/dir3/dir4 and dir1/dir2a=/dir5/dir6 example
We are now ready to start.
Example a) An dir/=/dir1/dir2 example
A simple example will demonstrate that we can create multi-session cds
with the dir_feature of the type dir/=/dir1/dir2
Objetive: Saving root directories of Redhat 6.1 and Col 2.3 on a single CD.
Observation: Redhat installation is mounted on COL 2.3 at /mnt/redhat
First image - RedHat 6.1 - /mnt/redhat/root
genisoimage -D -l -r -f -m core -L -o image1.raw redhat/=/mnt/redhat/root
This will create a redhat directory on the cd. The option -D should be
used with care. The other options used in the above command are just
to demonstrate the use of genisoimage. Please
refer to man genisoimage if you want to know more.
To see if the image is created as expected, we need to mount image1.raw using
the option -o loop (Linux only! for information on Solaris read README.verify)
as follows:
mount -t iso9660 image1.raw /mnt/image -o loop
To see the contents type:
ls -l /mnt/image/redhat
Does it look ok? Great! Unmount /mnt/image. Now the burning process itself:
wodim -v -dev=0,3,0 -multi -eject image1.raw
To check the burned image we need to mount the cd; something like
mount -t iso9660 /dev/scd0 /mnt/cdroms
/mnt/cdroms is the device file for the cdrom I use.
Second image - Caldera 2.3 - /root
To create the second image on our cd, we need get information
about sectors related to the first track. To do that, issue the command
wodim -v -dev=0,3,0 -msinfo
wodim returns the following number
0,135563
This number is the format XX,YY discussed on README.multi. XX would be used
for testing the images as well as burning the new track.
genisoimage -D -l -r -f -m core -L -C 0,135563 -M /dev/scd0 -o image2.raw caldera/=/root
Now we need to check of image2.raw is ok. The following command creates exactly what we
need. Plese note that -C option. Only the first number changes in this case. The second one
is always zero. In our case the first number is zero due to wodim -msinfo. When
more tracks are added to the cd this number will change.
genisoimage -D -l -r -f -m core -L -C 0,0 -M /dev/scd0 -o image2_test.raw caldera/=/root
mount -t iso9660 image2_test.raw /mnt/image -o loop
ls -l /mnt/image shows that there are two directories: redhat and caldera, just the way
we wanted.
Now let us burn image2.raw (not image2_test.raw)
wodim -v -dev=0,3,0 -multi -eject image2.raw
We can mount the CD again to see that the two directories are there. We can carry on
doing this until we decide to close the CD. If this is the case, don't use -multi when
burning the last session.
b) A dir1/dir2/=/dir3/dir4 and dir1/dir2a=/dir5/dir6 example
The above example seems a bit silly, one could argue. Why did I create a single directory
called root and within two sub-directories: redhat and caldera?
Using the procedure described above we would do as follows:
genisoimage -D -l -r -f -m core -L -o image1.raw etc/redhat/=/mnt/redhat/etc
wodim -v -dev=0,3,0 -multi -eject image1.raw
To check the burned image we need to mount the cd; something like
mount -t iso9660 /dev/scd0 /mnt/cdroms
wodim -v -dev0,3,0 -msinfo
wodim returns the following number
0,14391
The second image can be created using
genisoimage -l -r -f -m core -L -C 0,14391 -M /dev/scd0 -o image2.raw etc/caldera/=/etc
Creating a test image2
genisoimage -l -r -f -m core -L -C 0,0 -M /dev/scd0 -o image2_test.raw etc/caldera/=/etc
mount -t iso9660 image2_test.raw /mnt/image1 -o loop
It works!! That is great!!!
Now the burning process itself.
wodim -v -dev=0,3,0 -multi -eject image2.raw
and we're done !!!!
To add more tracks just do as indicated above.
Good luxk!!!
Eduardo Mendes - 11/23/99
Source: README.graft_dirs from cdrtools package
Edited for cdrkit by Christian Fromme <kaner@strace.org> and Eduard Bloch
|