home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 November / PCONLINE_11_99.ISO / filesbbs / OS2 / CDR18A24.ZIP / doc / More-Docs / README.multi < prev    next >
Encoding:
Text File  |  1999-02-01  |  3.9 KB  |  124 lines

  1. Creating multi-session CD's Mini Howto FAQ
  2.  
  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.
  6.  
  7. To test (with Linux):
  8.  
  9. Create a iso-9660 filesystem image with mkisofs-1.10 or later.
  10. mkisofs-1.11 is included in the cdrecord-1.3 release (including
  11. SunOS/Solaris multi-session support)
  12. Use the -R flag to add Rock Ridge extensions (this is important).
  13.  
  14. Assuming that the CD-R drive is connected to target 2 on the SCSI bus.
  15.  
  16. Write the first session with:
  17.  
  18. cdrecord -v speed=2 dev=2,0 -eject -multi isoimage.raw
  19.  
  20. This must be a iso9660 image with Rock Ridge extensions (see above)
  21.  
  22. Note the number of sectors written and check the disk, it should be mountable.
  23.  
  24. Next step is to check if cdrecord is able to retrieve the following data:
  25.  
  26.     1) The first block (sector) number in the first track of the last session
  27.        This must be '0' in our case.
  28.  
  29.     2) The next writable address in the unwritten session following the current.
  30.        This should be the number of sectors written in the first
  31.        run + ~ 11400 sectors for about 22MB lead out/in
  32.  
  33. To get this information type:
  34.  
  35. cdrecord -msinfo dev=2,0
  36.  
  37. The output should be two numbers separated by a comma.
  38.  
  39.     e.g.: 0,204562
  40.  
  41. The first number is (1), the second number is (2).
  42.  
  43. Create the image for the next session with mkisofs-1.11 or later (you may retrieve this
  44. from our ftp server from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord,
  45. but it is included in the current cdrecord distribution).
  46.  
  47. 2nd session:
  48. You should create a directory that contains a second directory with data in it
  49. for this purpose.
  50.  
  51.     e.g.:
  52.         first_dir/
  53.             second_dir/
  54.                 file_1
  55.                 file_2
  56.                 ...
  57.  
  58. call:
  59.  
  60. On Linux:
  61. mkisofs -o isoimage_2.raw -R  -C xx,yy -M /dev/cdwriter_blk_dev  first_dir
  62.  
  63. On SunOS:
  64. mkisofs -o isoimage_2.raw -R  -C xx,yy -M target,lun first_dir
  65.  
  66.  
  67.  
  68. The argument of -C is the output of cdrecord -msinfo
  69. -    On Linux, the argument of -M is a device that would allow you to mount 
  70.     the current CD in the CD-writer
  71. -    On SunOS, target and lun refer to the SCSI target and lun of the 
  72.     CD-R device with the same notation as for cdrecord dev=xxx,yyy .
  73.  
  74.  
  75. If you want to check, whether mkisofs make evething right, you should create 
  76. another image by using the following command line.
  77.  
  78. On Linux:
  79. mkisofs -o isoimage_3.raw -R  -C xx,0 -M /dev/cdwriter_blk_dev  first_dir
  80.  
  81. On SunOS:
  82. mkisofs -o isoimage_2.raw -R  -C xx,0 -M target,lun first_dir
  83.  
  84. You may check ***this** image by mounting it with my "fbk" on Solaris 
  85. or the loopback driver on Linux.
  86.  
  87. On Linux type:
  88.     mount isoimage_3.raw -r -t iso9660 -o loop /mnt
  89.  
  90. On SunOS type:
  91.     mount -r -F fbk -o type=hsfs /dev/fbk0:isoimage_3.raw /mnt
  92.  
  93. If you list /mnt, you should see all directories that have been in the first 
  94. session and the directory "second_dir". If you try to read a file from the
  95. first session, you will get an I/O error or bad data (depending on the
  96. block address), don't worry about that. If you try to read a file from
  97. the secons session, you will see everything correctly.
  98.  
  99. To write the second session to CD, call:
  100.  
  101. cdrecord -v speed=2 dev=2,0 -eject -multi isoimage_2.raw
  102.  
  103. If you mount this CD, you should see the first session and the second directory 
  104. from 2nd session added to the root directory of the CD.
  105.  
  106.  
  107. Additional check:
  108.  
  109. call:
  110.  
  111. cdrecord -msinfo dev=2,0
  112.  
  113. The first number should be the first writable address which was retrieved by the
  114. first call to cdrecord -msinfo after creating the first session.
  115. The second number should be the first number + number of sectors of the second session
  116. + ~ 11400 sectors.
  117.  
  118. Note: The first lead-out is 1:30 (6750 sectors) the lead-in is 1:00 (4500 sectors)
  119. All following sessions need only 0:30 for lead-out (2250 sectors), the lead-in
  120. is also 1:00. So in theory, the can be 44 sessions on s 74 minute disk if you
  121. take into account that the minimum track size is 4 seconds.
  122.  
  123. Joerg Schilling
  124.