Solaris CD-ROMS
Contents
- Overview
- What You Can Do With Diskettes and CDs
- Using CD Names
- How to Load a CD
- How to Examine the Contents of a CD
- How to Find Out If a CD Is Still in Use
- How to Eject a CD
- How to Access CDs on Other Systems
- How to Make Local CDs Available to Other Systems
- How to Configure a System to Play Musical CDs
- How to Prepare a System for a New CD-ROM Drive
- Configuring Volume Management
- How to Stop Volume Management
- How to Restart Volume Management
Overview
The table below compares the steps involved in manual mounting (without Volume Management) and automatic mounting (with Volume Management).
Steps Manual Mounting Automatic Mounting 1 Insert media. Insert media. 2 Become superuser. For diskettes, use the volcheck command. 3 Determine the location of the media device. Volume Management automatically performs many of the tasks previously required to manually mount and work with CDs and diskettes. 4 Create a mount point. 5 Make sure you are not in the mount point directory. 6 Mount the device using the proper mount options. 7 Exit the superuser account. 8 Work with files on media. Work with files on media. 9 Become superuser. 10 Unmount the media device. 11 Eject media. Eject media. 12 Exit the superuser account.
What You Can Do With Diskettes and CDs
Essentially, Volume Management enables you to access diskettes and CDs just as manual mounting does, but more easily and without the need for superuser access. To make diskettes and CDs easier to work with, they are mounted in easy-to-remember locations.
To Access ... Insert ... And Find the Files In ... Files on a diskette The diskette and enter volcheck Raw data on a diskette The diskette and enter volcheck Files on a CD The CD and wait for a few seconds
Using CD Names
When working with CDs, you can identify them by name or with a designator from the table below. For brevity, task descriptions use cdrom0, but you can replace this with either the CD name or a different designator.
CD Alternate Name First CD-ROM drive cdrom0 Second CD-ROM drive cdrom1 Third CD-ROM drive cdrom2
How to Load a CD
Insert the CD. Shortly after the light stops flashing (about five to ten seconds), the CD is mounted to /cdrom.
Most CDs are formatted to the ISO 9660 standard, which is portable, so most CDs can be mounted by Volume Management. UFS CDs are not portable between architectures, so they must be used on the architecture for which they were designed. If you are having trouble mounting a CD, particularly if it is an installation CD, make sure its UFS file system is appropriate for your system's architecture (check the label on the CD).
How to Examine the Contents of a CD
Use the ls -L command to view the contents of /cdrom directory.
$ ls -L [-l] /cdrom/cdrom0
How to Find Out If a CD Is Still in Use
- Become superuser. g
- Identify the processes accessing the CD.
The /tech/sun/commands/fuser.html">fuser(1M) command lists the processes that are currently accessing the CD that you specify.
# /tech/sun/commands/fuser.html">fuser -u [-k] /cdrom/cdrom0The /tech/sun/commands/fuser.html">fuser command might not always identify all the killed processes. To be sure, run it again with the -u option.
Example--Finding Out If a CD Is Still in Use
In the following example, the processes 6400c and 6399c are accessing the /cdrom/cdrom0 directory, and the process owners are root and smith, respectively.
# /tech/sun/commands/fuser.html">fuser -u /cdrom/cdrom0
/cdrom/cdrom0: 6400c(root) 6399c(smith)You can kill the processes individually (as superuser), or you can use the /tech/sun/commands/fuser.html">fuser command with the -k option, which kills all the processes accessing that file system, as shown in the following example.
# /tech/sun/commands/fuser.html">fuser -u -k /cdrom/cdrom0
/cdrom/cdrom0: 6400c(root)Killed 6399c(smith)Killed
How to Eject a CD
- Make sure the CD is not being used.
Remember, a CD is "being used" if a shell or an application is accessing any of its files or directories. If you are not sure whether you have found all users of a CD (a shell hidden behind a desktop tool might be accessing it), use the /tech/sun/commands/fuser.html">fuser command
- Eject the CD.
# eject cdrom0
How to Access CDs on Other Systems
You can access a CD on another system by mounting it manually into your file system--provided the other system has shared its CD-ROM according.
- Select an existing directory to serve as the mount point or create one.
$ /tech/sun/commands/mkdir.html">mkdir directory- Find the name of the CD you want to mount.
$ /tech/sun/commands/showmount.html">showmount -e system-name
export list for system-name:
/cdrom/sol_8_sparc (everyone)- As superuser, mount the CD.
# mount -F nfs -o ro system-name:/cdrom/cd-name local-mount-point- Log out as superuser.
- Verify that the CD is mounted by using the ls command to list the contents of the mount point.
$ ls /cdrom
Example--Accessing CDs on Other Systems
This example mounts the CD named sol_8_sparc from the remote system mars onto the /cdrom directory of the local system.
$ /tech/sun/commands/showmount.html">showmount -e starbug
export list for starbug:
/cdrom/sol_8_sparc (everyone)
$ su
Password: password
# mount -F nfs -o ro starbug:/cdrom/sol_8_sparc /cdrom
# exit
$ ls /cdrom
cdrom0 sol_8_sparc
How to Make Local CDs Available to Other Systems
You can configure your system to share its CD-ROM drives; in other words, make any CDs in those drives available to other systems. (This does not apply to musical CDs.)
- Become superuser.
- Find out whether the NFS daemon (nfsd) is running.
# /tech/sun/commands/ps.html">ps -ef | /tech/sun/commands/grep.html">grep /tech/sun/commands/nfsd.html">nfsdroot 14533 1 17 10:46:55 ? 0:00 /usr/lib/nfs/nfsd -a 16 root 14656 289 7 14:06:02 pts/3 0:00 /tech/sun/commands/grep.html">grep /tech/sun/commands/nfsd.html">nfsdIf the daemon is running, a line for /usr/lib/nfs//tech/sun/commands/nfsd.html">nfsd will appear, as shown above. If the daemon is not running, only the grep /tech/sun/commands/nfsd.html">nfsd line will appear.
- Select an option from the following table.
If ... Then ... nfsd is running Go to Step 8 nfsd is not running Continue with Step 4 - Create a dummy directory for /tech/sun/commands/nfsd.html">nfsd to share.
# /tech/sun/commands/mkdir.html">mkdir / dummy-dir- Add the following entry into the /etc/dfs/dfstab file.
share -F nfs -o ro [-d comment] /dummy-dirWhen you start the NFS daemon, it will see this entry, "wake up," and notice the shared CD-ROM drive. Note that the comment (preceded by -d) is optional.
- Start the NFS daemon.
# /etc/init.d/nfs.server start- Verify that the NFS daemon is indeed running.
# /tech/sun/commands/ps.html">ps -ef | /tech/sun/commands/grep.html">grep /tech/sun/commands/nfsd.html">nfsd
root 14533 1 17 10:46:55 ? 0:00 /usr/lib/nfs/nfsd -a 16
root 14656 289 7 14:06:02 pts/3 0:00 /grep /tech/sun/commands/nfsd.html">nfsd- Eject any CD currently in the drive.
# eject cdrom0- Assign root write permissions to the /etc/rmmount.conf file.
# /tech/sun/commands/chmod.html">chmod 644 /etc/rmmount.conf"- Add the following lines to the /etc/rmmount.conf file.
# File System Sharing share cdrom*These lines share any CD loaded into your system's CD-ROM drive. You can, however, limit sharing to a particular CD or series of CDs.
- Remove write permissions from the /etc/rmmount.conf file.
# /tech/sun/commands/chmod.html">chmod 444 /etc/rmmount.conf"This step returns the file to its default permissions.
- Load a CD.
The CD you now load, and all subsequent CDs, will be available to other systems. Remember to wait until the light on the drive stops blinking before you verify this task.
To access the CD, the remote user must mount it by name, according to the instructions in
- Verify that the CD is indeed available to other systems by using the share command.
If the CD is available, its share configuration will be displayed. (The shared dummy directory will also be displayed.)
# share
- /dummy ro "dummy dir to wake up NFS daemon"
- /sol_7_sparc ro ""
Example--Making Local CDs Available to Other Systems
The following example makes any CD loaded into the local system's CD-ROM drive available to other systems on the network.
# /tech/sun/commands/ps.html">ps -ef | /tech/sun/commands/grep.html">grep /tech/sun/commands/nfsd.html">nfsd
root 10127 9986 0 08:25:01 pts/2 0:00 /tech/sun/commands/grep.html">grep /tech/sun/commands/nfsd.html">nfsd
root 10118 1 0 08:24:39 ? 0:00 /usr/lib/nfs/nfsd -a
# /tech/sun/commands/mkdir.html">mkdir /dummy
# vi /etc/dfs/dfstab
(Add the following line:)
share -F nfs -o ro /dummy
# eject cdrom0
# /tech/sun/commands/chmod.html">chmod 644 /etc/rmmount.conf"
# vi /etc/rmmount"
(Add the following line to the File System Sharing section:)
share cdrom*
# /tech/sun/commands/chmod.html">chmod 444 /etc/rmmount.conf"
(Load a CD.)
# share
- /dummy ro ""
- /cdrom/sol_7_sparc/s5 ro ""
- /cdrom/sol_7_sparc/s4 ro ""
- /cdrom/sol_7_sparc/s3 ro ""
- /cdrom/sol_7_sparc/s2 ro ""
- /cdrom/sol_7_sparc/s1 ro ""
- /cdrom/sol_7_sparc/s0 ro ""
#
How to Configure a System to Play Musical CDs
You can play musical CDs from a CD-ROM attached to your Solaris system. You'll need to access Workman, which is public domain software, and attach external speakers or headphones independently to the CD-ROM drive; speakers attached to the system hardware will not work.
Once you configure your system, you can play a musical CD simply by inserting it into the CD-ROM drive. The Workman control panel is automatically displayed on your desktop.
- Become superuser.
- Edit /etc/rmmount.conf.
Add the following line under # Actions, before the cdrom action, as shown in the example below.
# Actions
action cdrom action_workman.so path/workman workman-options
Example--Configuring a System to Play Musical CDs
This example shows an /etc/rmmount.conf file modified to support the Workman software.
# @(#)rmmount.conf 1.3 96/05/10 SMI
#
# Removable Media Mounter configuration file.
#
# File system identification
ident hsfs ident_hsfs.so cdrom
ident ufs ident_ufs.so cdrom floppy rmscsi pcmem
ident pcfs ident_pcfs.so floppy rmscsi pcmem
# Actions
action cdrom action_workman.so /usr/dist/exe/workman
action cdrom action_filemgr.so
action floppy action_filemgr.so
action rmscsi action_filemgr.so
# File System Sharing
share cdrom*
share floppy*
How to Prepare a System for a New CD-ROM Drive
Preparing the system involves creating the /reconfigure file and rebooting the system so that Volume Management recognizes the new CD-ROM drive.
- Become superuser.
- Create a file called /reconfigure.
# /tech/sun/commands/touch.html">touch /reconfigure- Reboot the system.
# init 6
Configuring Volume Management
Occasionally, you might want to manage diskettes or CDs without the help of Volume Management. This section describes how to stop and restart Volume Management.
How to Stop Volume Management
- Make sure no diskettes or CDs are being used.
If you are not sure whether you have found all users of the diskette or CD, use the /tech/sun/commands/fuser.html">fuser command.
- Become superuser.
- Enter the volmgt stop command.
# /etc/init.d/volmgt stop
#
How to Restart Volume Management
- Become superuser. g
- Enter the volmgt start command.
# /etc/init.d/volmgt start
volume management starting.