1 This is from "Eduardo M. A. M. Mendes" <mendes@mgconecta.com.br>
3 Creating multi-session CD's with dir=/ feature Micro Howto
5 This mini-howto was written as guide to help me to create multi-session CD's
6 with the possibility of determining the location of files. I hope
7 that this guide helps you too.
9 In order to use wodim it is first necessary to define to which scsi bus
10 the cd-writer is connected. In my case the setup is dev=0,3,0. It is also
11 interesting to have a separate directory in which all image files can
12 be dumped: /home/cdsource is the directory I chose for dumping the images.
14 The best way to understand how to create multi-session cds is to read
15 README.multi. Most of what is going to be said here is based on that
16 README file and on the help of several wodim users.
18 This Micro Howto is divided into two parts as follows:
20 Example a) A dir/=/dir1/dir2 example
22 Example b) A dir1/dir2/=/dir3/dir4 and dir1/dir2a=/dir5/dir6 example
25 We are now ready to start.
27 Example a) An dir/=/dir1/dir2 example
29 A simple example will demonstrate that we can create multi-session cds
30 with the dir_feature of the type dir/=/dir1/dir2
32 Objetive: Saving root directories of Redhat 6.1 and Col 2.3 on a single CD.
34 Observation: Redhat installation is mounted on COL 2.3 at /mnt/redhat
36 First image - RedHat 6.1 - /mnt/redhat/root
38 genisoimage -D -l -r -f -m core -L -o image1.raw redhat/=/mnt/redhat/root
40 This will create a redhat directory on the cd. The option -D should be
41 used with care. The other options used in the above command are just
42 to demonstrate the use of genisoimage. Please
43 refer to man genisoimage if you want to know more.
46 To see if the image is created as expected, we need to mount image1.raw using
47 the option -o loop (Linux only! for information on Solaris read README.verify)
50 mount -t iso9660 image1.raw /mnt/image -o loop
52 To see the contents type:
54 ls -l /mnt/image/redhat
56 Does it look ok? Great! Unmount /mnt/image. Now the burning process itself:
58 wodim -v -dev=0,3,0 -multi -eject image1.raw
60 To check the burned image we need to mount the cd; something like
62 mount -t iso9660 /dev/scd0 /mnt/cdroms
64 /mnt/cdroms is the device file for the cdrom I use.
67 Second image - Caldera 2.3 - /root
70 To create the second image on our cd, we need get information
71 about sectors related to the first track. To do that, issue the command
73 wodim -v -dev=0,3,0 -msinfo
75 wodim returns the following number
79 This number is the format XX,YY discussed on README.multi. XX would be used
80 for testing the images as well as burning the new track.
82 genisoimage -D -l -r -f -m core -L -C 0,135563 -M /dev/scd0 -o image2.raw caldera/=/root
84 Now we need to check of image2.raw is ok. The following command creates exactly what we
85 need. Plese note that -C option. Only the first number changes in this case. The second one
86 is always zero. In our case the first number is zero due to wodim -msinfo. When
87 more tracks are added to the cd this number will change.
89 genisoimage -D -l -r -f -m core -L -C 0,0 -M /dev/scd0 -o image2_test.raw caldera/=/root
91 mount -t iso9660 image2_test.raw /mnt/image -o loop
93 ls -l /mnt/image shows that there are two directories: redhat and caldera, just the way
96 Now let us burn image2.raw (not image2_test.raw)
98 wodim -v -dev=0,3,0 -multi -eject image2.raw
100 We can mount the CD again to see that the two directories are there. We can carry on
101 doing this until we decide to close the CD. If this is the case, don't use -multi when
102 burning the last session.
104 b) A dir1/dir2/=/dir3/dir4 and dir1/dir2a=/dir5/dir6 example
106 The above example seems a bit silly, one could argue. Why did I create a single directory
107 called root and within two sub-directories: redhat and caldera?
109 Using the procedure described above we would do as follows:
111 genisoimage -D -l -r -f -m core -L -o image1.raw etc/redhat/=/mnt/redhat/etc
113 wodim -v -dev=0,3,0 -multi -eject image1.raw
115 To check the burned image we need to mount the cd; something like
117 mount -t iso9660 /dev/scd0 /mnt/cdroms
119 wodim -v -dev0,3,0 -msinfo
121 wodim returns the following number
125 The second image can be created using
127 genisoimage -l -r -f -m core -L -C 0,14391 -M /dev/scd0 -o image2.raw etc/caldera/=/etc
129 Creating a test image2
131 genisoimage -l -r -f -m core -L -C 0,0 -M /dev/scd0 -o image2_test.raw etc/caldera/=/etc
133 mount -t iso9660 image2_test.raw /mnt/image1 -o loop
135 It works!! That is great!!!
137 Now the burning process itself.
139 wodim -v -dev=0,3,0 -multi -eject image2.raw
143 To add more tracks just do as indicated above.
147 Eduardo Mendes - 11/23/99
149 Source: README.graft_dirs from cdrtools package
150 Edited for cdrkit by Christian Fromme <kaner@strace.org> and Eduard Bloch