Question Index:
% cdmount 1
% cd /cdrom
Note that some machines can have more than one CD reader. In that case,
use a 1 or a 2 depending on the CD drive of interest. For machines with
a single CD reader, "cdmount 1" and "cdmount" are equivalent.
Q: How do I remove a CD?
A: Unmount the cdrom drive and then press the eject button.
% cdumount 1
Make sure that you are no longer in the /cdrom directory or you will
get a message saying the the cdrom is busy.
Q: How do see a list of which CD-ROM drives
are being used, and which are available?
A:
The command "cdtable" (in /usr/coolstuff/bin) will display a
list of CD-ROM drives available, and list the user names, dates, and
volume names for CD-ROMs which are currently mounted. The table may also
be viewed using the command "cat /n/oe800/u/cdtable/*".
% cd src_dir
% find . -print > index.txt
% cd src_dir
% find . -type f -exec md5sum {} \; | sort +2 > MD5SUMS
% lock_precd
If someone else has the partition locked, you will get an access
denied message. Note: this command resides in /usr/local/bin on
bulp3427.
Q: How do I create a CD image using Gear
A:
This is done using the following steps:
% cp /n/colt45/usr/gear/.gearrc ~
Make sure to set the GEARDIR environmental variable:
% setenv GEARDIR ~
% mkdir /tmp/your_username
% cd /tmp/your_username
% msgen
This should return the following, and you want to continue
ERROR: No CD-Recording units found.
QUESTION: Do you want to continue anyway? Y/N (N) Y
CD> editprefs
Use defaults if you have proper .gearrc
Please enter non-ISO9660 name handling level:
1 = Ignore non-ISO9660 names
2 = Translate non-ISO9660 names to upper case only
...
4 = Translate completely to A-Z, 0-9, '_' and length 8+3.
5 = Rockridge (with complete translation to A-Z, 0-9, '_' and length 8+3).
Choosing option 1 will create a CD which contains up to 32-character
long file names. Such a CD will operate fine in Unix and Windows95 as long
as no file names exist which are longer than 32 characters. However, in
DOS (using mscdex.exe) only the first 8 characters of the file name will
be visible, which may make some files inaccessible.CD> setup(Y here will burn the CD)
QUESTION: Use physical image file(s)? Y/N (N) N
QUESTION: Enable recording of disc? Y/N (N) N
Write method (1 = disc at once, 2 = track at once, 3 = fixed packets):
(1 <= value <= 3)(2) 2
Number of copies to write? (1 <= value <= 1000)(1) 1
Recording speed (x real-time)? (1 <= value <= 6)(4) 4
QUESTION: Enable multi-session writing? Y/N (Y) Y
QUESTION: Do you want to save this setup in the .gearrc file? Y/N (Y) Y
CD> newvol
Please enter name of volume to create: VOLNAME
Please enter volume capacity as 18, 63, 74 or 80 minutes: (74) 63
Volume VOLNAME created.
Please enter type of track to create as ISO, XA or DA : (ISO) iso
CD> selvol
Please enter name of volume to select: VOLNAME
Volume VOLNAME selected.
Please enter number of track to select: (1 <= value <= 99)(1) 1
Track 1 selected.
CD> cp -r src_dir
which copies files IN src_dir into current directory of image, OR,
CD> cp -r src_dir .
which copies src_dir (including the directory name) into the current directory.
CD> vdir
CD> physvol
This can take a long time.
CD> exit
% (cat /d/your_username/VOLNAME.p01 | /home/cdr/saverawcd) &
The application name, preparer name, publisher name, and other settings in the .mkisofsrc file are just comment fields in the CDROM header, and really have little value. It is best to include a full description in a description.txt file in the root directory of the CDROM.
For example, the following is a useful starting point:
APPI=Ultrasound data sets
COPY=Univerisity of Michigan, 1997
ABST=description.txt
BIBL=md5sums
PREP=Philip VanBaren
PUBL=Biomedical Ultrasonics Lab, University of Michigan, 3304 G.G. Brown, 2350 Hayward Rd., Ann Arbor, MI 48109
SYSI=mkisofs/cdwrite
VOLS=This CD contains the data from experiments performed in the Biomedical Ultrasonics Lab at the University of Michigan
mkisofs -o /dev/precd -a -D -L -r -J -v -V "August 1997 data set" /n/pabst/u/var/tmp/cdrom
This will take the directory structure under /n/pabst/u/var/tmp/cdrom and
copy it into a CD image on the precd device on bulp3427.
The options for this command are as follows
Also, the .mkisofsrc settings may be overridden using:
Note: It is possible to set up the entire contents of the CDROM image using symbolic links so that the data need not be all moved from its original location. If you do this, add the switch "-f" to the mkisofs command line to force it to dereference (follow) symbolic links. Beware, though, that when doing this that ALL symbolic links will be deferenced, so you lose the ability to use symbolic links on the CDROM. When using md5sum to verify the image, it will be necessary to use the "-follow" option to have it follow symbolic links as well. This is also necessary when performing the md5sum on the CDROM image (which no longer has symbolic links) because of a bug in mkisofs which does not set the directory link count properly when symbolic links are used.
Note: The /d directory on Bulp3427 is a Windows (VFAT) partition which may be used as temporary storage for data to be written to CDs. Since it is a VFAT filesystem, any files put there will lose their Unix attributes such as ownership, permissions, and symbolic links. If you wish use this temporary space as a Unix filesystem, run the following commands:
Total extents scheduled to be written = 255630
Total extents actually written = 255630
An "extent" is a 2048 byte sector on the CD-ROM disc, which are
stored at a rate of 75 per second. The number of extents that can fit
on a CD-ROM depends on the length of the disc; discs
come in 63 minute, 74 minute, and 80 minute varieties. The number of extents
that can fit on these disks is as follows:
mkhybrid -o /dev/precd -a -D -L -r -J -h -v -V "August 1997 data set" /n/pabst/u/var/tmp/cdrom
This will take the directory structure under /n/pabst/u/var/tmp/cdrom and
copy it into a CD image on the precd device on bulp3427.
The options for this command are as
described above, with the following addition
% cdmount 0
% cd /precd
% find . -type f -exec md5sum {} \; | sort +2 > /tmp/md5sums.precd
% diff -u /precd/MD5SUMS /tmp/md5sums.precd
% cd ~
% cdumount 0
% cdmount
% cd /cdrom
% find . -type f -exec md5sum {} \; | sort +2 > /tmp/md5sums.cdrom
% diff -u /cdrom/MD5SUMS /tmp/md5sums.cdrom
% cd ~
% cdumount
% unlock_precd
If someone else has the partition locked, you will get an access
denied message. Note: this command resides in /usr/local/bin on
bulp3427.