Notes on CD-R Writing at McDonald

CD-R Writing for Multiple Platforms


S. C. Odewahn (Last update: Jan 2004)


I've not found a clear path to writing CDs that work uniformly across all of the linux/solaris/MS machines I am now using at McDonald Observatory.


To write CD:
mkisofs -r -o ./TEMP ./
cdrecord -v speed=4 dev=0,6,0 -data ./TEMP

The -r specified Rockridge convention. For easier reading on MS 
systems I think I need Joliet, so try:
mkisofs -J -o ./TEMP ./

NOTE: To determine the proper dev=VALUE for cdrecord, use:
% cdrecord -scanbus

Must do this as SU! 

[sco@morpho ~/Notes]$ cdrecord -scanbus
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jrg Schilling
Linux sg driver version: 3.1.24
cdrecord: Permission denied. Cannot open '/dev/sg1'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
[sco@morpho ~/Notes]$ su root
Password:
[root@morpho Notes]# cdrecord -scanbus
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jrg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
scsibus0:
        0,0,0     0) 'TDK     ' 'DVDRW0404N      ' '1.08' Removable CD-ROM
        0,1,0     1) *
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *

So, looks to me like I would try:
mkisofs -J -o ./TEMP ./
cdrecord -v speed=4 dev=0,0,0 -data ./TEMP       (as su) 

TEST1: 
  I copied some stuff with lower case and long file names into the 
directory called cdtest.
mkisofs -J -file-mode 666 -o ./TEMP ./cdtest
cdrecord -v speed=4 dev=0,0,0 -data ./TEMP 
cdrecord -v speed=8 dev=0,0,0 -data ./TEMP 

IMPORTANT NOTE: 
 Using the -file-mode argument is fine (and desirable) under 
 RedHat 9, but is unrecognized and fails under RedHat7.3. For 
 the latter, you are advised to pack your directory tree into 
 tar file with a short and simple name. This single file can 
 be written to a CD-R, and then unpacked correctly after being 
 read on the target machine. 

After reading back in use: 
chmod a+w -R *

This works on buckaroo! However, all files have 777 status. Probably a 
way to change this in mkisofs, but I've not found it yet! 

To test the TEMP image witout actually burning a CD:
As su: 
  mount ./TEMP -r -t iso9660 -o loop /mnt
  ls -lR /mnt
    mkdir junk
    cd junk 
    cp -r /mnt/* . 
      Check it out!!!!
  umount /mnt


Writing CD's on the MS-based laptops:
=====================================

  The Roxio "Easy CD Creator" software available on our laptops
does an okay job of writing CD's that are readable on both the 
MS- and linux-driven machines. The key, once again, is that you 
write the CD's using the Joliet convention. Here are a few hints:

  1) Click on the "Easy CD Creator" package from the main 
     Start menu (or use a short-cut desktop icon if you have 
     created one).

  2) Use the upper window in "Easy CD Creator" to locate the 
     the folders you wish to save. Drag each folder into the lower 
     window (which is labeled "data CD project"). I general have 
     to double-click on my "home" folder to access the linux-based 
     directories stored on the laptop. 

  4) Select "New CD Project" and "Data CD" from the File menu.

  5) Under the File menu, click on "CD Project Properties". In 
     the window that appears (the General screen), be sure that 
     the File System value is "Joliet".

  6) Click on "Record CD" in the File menu. Hit the "Start Recording" 
     button in the screen that pops up. When the CD drive opens, insert 
     a blank disk and hit the "Retry" option. If a second window pops
     up, choose the "Take no action" option. 

Open questions: 
   In the case of file paths with more than 64 characters, or for 
   directory trees with more than 8 levels, many parts of the 
   "Easy CD Creator" package complain. 

An answer: 
   From some web searching I see that many people have experienced 
   problems with this. Joliet is an MS extension of the ISO9660 format
   designed to support long file names. BUT, a long filename is one 
   that is still <64 characters (not <128 characters). Also, the depth 
   of a directory tree appears to be a problem. 
     
One Test:
   I tried writing my CD on the laptop using the ISO9660 format. Long 
   files names seem to get over, but I have 777 permissions for all 
   files.

Current wisdom:
   * Going from linux to MS requires Joliet, otherwise I get 
     shortened, capitalized file names. 

   * Going from MS to linux seems more flexible, however Joliet 
     can result in complaints about long file names and large 
     directory trees. 

Another observation:
   I wrote a CD-R on buckaroo (linux RedHat9 box) using large directory 
   structures (top directory = test2) with very long path and file 
   names. Many of these files, because they were poorly transfered from 
   a poorly produced MS-run laptop CD-R had 777 privelege. However, using 
   the following mkisofs run, and reading the resulting CD-R on my home 
   (RedHat7.2) box, I was able to transfer the full data set, and the 
   files all had 666 priveleges. This is a step in the right direction. 

   % mkisofs -J -file-mode 666 -o ./TEMP ./test2
   % cdrecord -v speed=4 dev=0,0,0 -data ./TEMP
  
   On home machine:
   % cp -r /mnt/cdrom1/* .
   % chmod a+w -R *

   ==================================================== 
   Reading a CD on the Solaris boxes:
    Put the CD in Solaris box CD drive and wait for 
    the blinking yellow light to stay lit. Then,

    Duh?> pwd
      /home/mcs/astronomer/sco/cd_work
    Duh?> ls /cdrom/cdrom
          tmp.tar
    Duh?> cp /cdrom/cdrom/* .

    NOTE: I usually alway write a tarball to the CD-R
          and find that these unpack nicely under the 
          OS now running on mcs and ion. 

    To unmount the CD:
     Select Demos in the pulldown menu. 
     A File Manager window will open for /cdrom/cdrom
     Hit the "Eject" button in the middle of this gui. 
       
   ==================================================== 




Back to HET Factoids Page