- Mounting and Unmounting the CD-ROM Drive on Solaris/Linux
- Table Of Contents
- Mounting and Unmounting the CD-ROM Drive on Solaris/Linux
- Mounting a Local CD-ROM for Solaris
- Mounting a Local CD-ROM for Linux
- Mounting an Network File System-Exported CD-ROM Drive
- Steps to Perform on the Remote System for Solaris
- Steps to Perform on the Remote System for Linux
- Steps to Perform on the Local System for Solaris and Linux
- Unmounting the CD-ROM Drive
- Unmounting a Local CD-ROM Drive for Solaris and Linux
- How to eject a CD/DVD from the command line
- 6 Answers 6
- Opening the Tray
- Easy Function for .bashrc
- Notice
- Closing the Tray
Mounting and Unmounting the CD-ROM Drive on Solaris/Linux
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Table Of Contents
Mounting and Unmounting the CD-ROM Drive on Solaris/Linux
You can install the SGM server or client software from a CD-ROM drive connected to your local system or from a CD-ROM drive connected to a remote system. In either case, you must first mount the CD-ROM drive. Mounting a device makes it available to the local file system.
This appendix presents the CD-ROM drive mounting and unmounting instructions in the following sections:
•Mounting a Local CD-ROM for Solaris
•Mounting a Local CD-ROM for Linux
•Mounting an Network File System-Exported CD-ROM Drive
•Unmounting the CD-ROM Drive
Mounting a Local CD-ROM for Solaris
To mount a local CD-ROM for Solaris:
Step 1 Insert the SGM CD-ROM into the CD-ROM drive.
Step 2 Log in as the root user, as described in the «Becoming the Root User» section. The command prompt changes to the pound sign (#).
Step 3 If the /cdrom directory does not already exist, create it using the mkdir command:
Step 4 Mount the CD-ROM drive.
Note The vold process manages the CD-ROM device and performs the mounting. The CD-ROM should mount automatically onto the /cdrom/SGM41 or /cdrom/cdrom0 directory.
If you are running File Manager, a separate File Manager window displays the contents of the CD-ROM.
Step 5 If the /cdrom/SGM41 or /cdrom/cdrom0 directory is empty because the CD-ROM was not mounted, or if File Manager did not open a window displaying the contents of the CD-ROM, verify that the vold daemon is running by entering the following command:
# ps -e | grep vold | grep -v grep
Step 6 Do one of the following:
•If the vold daemon is running, the system displays the process identification number of vold. If the system does not display anything, restart the daemon by entering the following command:
•If the vold daemon is running but did not mount the CD-ROM, then stop the vold daemon process using the kill command and restart the daemon:
# kill -15 process_ID_number
Note To stop the vold process, you must know the process identification number. If you do not know the process identification number, enter the ps command shown in Step 5.
Step 7 If you have problems with the vold daemon, use the following mount command to mount the CD-ROM directly:
# mount -F hsfs -r ro /dev/dsk/device_filename /cdrom/SGM41
# mount -F hsfs -r ro /dev/dsk/device_filename /cdrom/cdrom0
Where:
-F indicates the type of file system (hsfs for the ISO 9660 standard).
-r ro mounts the CD-ROM in read-only mode.
device_filename is the name of the device, such as /dev/dsk/cxtyd0sz where x is the CD-ROM drive controller number, y is the CD-ROM drive SCSI ID number, and z is the slice partition on which the CD-ROM is located.
Mounting a Local CD-ROM for Linux
To mount a local CD-ROM for Linux:
Step 1 Insert the SGM CD-ROM into the CD-ROM drive.
Step 2 Log in as the root user, as described in the «Becoming the Root User» section. The command prompt changes to the pound sign (#).
Step 3 If the /mnt/cdrom directory does not already exist, create it using the mkdir command:
Step 4 Mount the CD-ROM drive:
Note Make sure that you are not in the /mnt/cdrom directory when you perform this step.
# mount /dev/cdrom /mnt/cdrom
Mounting an Network File System-Exported CD-ROM Drive
SGM installation from a device on a remote system does not require any disk space on the remote system. The software is copied across the network to the local system.
Caution The instructions for mounting a Network File System-exported (NFS-exported) CD-ROM drive on a local system are for like systems. For example, the instructions are for exporting a CD-ROM file system from a Solaris or Linux system and mounting it on another Solaris or Linux system for installation, but not for cross-platform operation. For help with cross-platform operations, see your system administrator.
Steps to Perform on the Remote System for Solaris
On the remote system perform the following steps:
Step 1 Log in as the root user as described in the «Becoming the Root User» section. The command prompt changes to the pound sign (#).
Step 2 If the /cdrom directory does not already exist, create it using the mkdir command:
Step 3 Mount the CD-ROM drive.
Note The vold process manages the CD-ROM device and performs the mounting. The CD-ROM should mount automatically mount onto the /cdrom/SGM41 or /cdrom/cdrom0 directory.
If you are running File Manager, a separate File Manager window displays the contents of the CD-ROM.
Step 4 If the /cdrom/SGM41 or /cdrom/cdrom0 directory is empty because the CD-ROM was not mounted, or if File Manager did not open a window displaying the contents of the CD-ROM, verify that the vold daemon is running by entering the following command:
# ps -e | grep vold | grep -v grep
Step 5 Do one of the following:
•If the vold daemon is running, the system displays the process identification number of vold. If the system does not display anything, then restart the daemon by entering the following command:
•If the vold daemon is running but did not mount the CD-ROM, then stop the vold daemon process using the kill command and restart the daemon:
#
kill -15 process_ID_number
Note To stop the vold process, you must know the process identification number. If you do not know the process identification number, enter the ps command shown in Step 5.
Step 6 If you have problems with the vold daemon:
a. Within the /cdrom directory, create the following directories:
b. Use the following mount command to mount the CD-ROM:
# mount -F hsfs -r ro /dev/dsk/device_filename /cdrom/SGM41
# mount -F hsfs -r ro /dev/dsk/device_filename /cdrom/cdrom0
Where:
-F indicates the type of file system (hsfs for the ISO 9660 standard).
-r ro mounts the CD-ROM in read-only mode.
device_filename is the name of the device, such as /dev/dsk/cxtyd0sz where x is the CD-ROM drive controller number, y is the CD-ROM drive SCSI ID number, and z is the slice partition on which the CD-ROM is located.
Step 7 Edit or create the /etc/dfs/dfstab file to include the following line, which sets the NFS attributes to read-only:
share -F nfs -o ro -d /cdrom/SGM41
share -F nfs -o ro -d /cdrom/cdrom0
Where:
-F specifies the file system share type.
-o specifies the start of file system export options.
ro specifies read-only file system export option.
-d specifies that you want to share a directory.
/cdrom/SGM41 or /cdrom/cdrom0 is the name of the directory to be shared.
Step 8 Make sure your remote machine is enabled as an NFS server by entering the following command:
# ps -ef | grep nfs | grep -v grep
Verify that the /usr/lib/nfs/nfsd and /usr/lib/nfs/mountd daemons are running.
Step 9 If the daemons you verified in Step 8 are not running, enable your machine as an NFS server by entering the following command:
#
/etc/init.d/nfs.server start
Step 10 When your machine is enabled as an NFS server, enter either of the following commands:
Steps to Perform on the Remote System for Linux
Note Make sure the nfs server is installed before performing these steps.
On the remote system perform the following steps:
Step 1 Log in as the root user as described in the «Becoming the Root User» section. The command prompt changes to the pound sign (#).
Step 2 If the /cdrom directory does not already exist, create it using the mkdir command:
Step 3 Insert the CD-ROM and mount the the drive:
# mount /dev/cdrom /mnt/cdrom
Step 4 Edit or create the /etc/exports file to include the following line, which sets the NFS attributes to read-only:
Step 5 Run the following command to restart the nfs server:
Steps to Perform on the Local System for Solaris and Linux
On the local system perform the following steps:
Step 1 Go to the machine on which you want to install SGM.
Step 2 Log in as the root user as described in the «Becoming the Root User» section.
Step 3 If the /cdrom directory does not already exist, create it using the mkdir command:
Step 4 To mount a file system that is exported from a remote system, use the mount command, as shown below:
# /usr/sbin/mount -r remote_hostname:/cdrom/SGM41 /cdrom/SGM
# /usr/sbin/mount -r remote_hostname:/cdrom/cdrom0 /cdrom/SGM
The remote CD-ROM is mounted and ready for software installation on the local system.
Note (Solaris only) When you are installing SGM using an NFS-exported CD-ROM drive, image checking might take several hours to complete. To avoid this problem, when you install SGM, enter ./setup.sh -i, which disables image checking.
Unmounting the CD-ROM Drive
Unmounting a Local CD-ROM Drive for Solaris and Linux
To unmount a local CD-ROM drive for Solaris or Linux:
Step 1 Log in as the root user as described in the «Becoming the Root User» section. The command prompt changes to the pound sign (#).
Step 2 (Solaris only) Enter the following commands:
How to eject a CD/DVD from the command line
I’ve just right clicked on the DVD icon in the Unity Launcher in order to eject it, but instead of hitting the ‘Eject’ button, I missed and hit the ‘Unlock from Launchpad’ option instead. How do I go about ejecting the disk from the drive now that the Launcher option is missing?
6 Answers 6
In order to eject a disk from the drive, whether it’s a CD or a DVD, open a terminal and simply execute the eject command.
The icon does not actually come back for that particular disk. A similar one will appear, at a lower resolution and without the eject option, and the full one will appear when you insert a new disk. I’m not sure how to undo this — I’m still looking into that.
I think you need too add the device after the eject command, like eject /dev/sr0 — It seems the default symlink /dev/dvd is not created anymore by default, and «eject» only works for /dev/dvd when entered without parameters
eject worked for me then got stopped working, with the following error: «eject: /dev/cdrom: not found mountpoint or device with the given name». After executing eject /dev/sr0 I could again use eject , eject -T etc.
To open the CD drive / eject the CD:
- Open Terminal using Ctrl + Alt + T , and type eject
- To close the tray, type eject -t
- And to toggle (if open, close and if closed, open) type eject -T
All these commands can be typed into the run dialogue ( Alt + F2 )
For more options, type eject -h into Terminal.
Opening the Tray
Easy Function for .bashrc
A few issues arise when ejecting drives. Sometimes they don’t want to eject, because they are mounted etc. You can override this with eject -l /media/mountpoint or ( /mnt/mountpoint ). I wrote a function that can be called by simply typing opentray on your command line.
Notice
- you setup a permanent mount point for your drive /dev/sr0 (same thing as /dev/cdrom , which is just symbolically linked to /dev/sr0 )
- your mount point is automatically created when you insert a disk into the drive. (This can be ignored if you remove/comment out all lines where rm -r «$» exists that way the mount point will never be removed automatically)
- Must run as root unless you changed the permissions manually of mounting functions (I have never tried this)
function opentray () < mountdir="/media/DVD" if [ -d "$" ] # If directory $ exists then if [ $(mount | grep -c "$") = 1 ] # If drive is mounted, then then echo "/dev/sr0 is now mounted to $. I'll try to unmount it first and eject/open the tray." umount -l "$" rm -r "$" sysctl -w dev.cdrom.autoclose=0 # Ensure drive doesn't auto pull tray back in. eject exit else echo "/dev/sr0 is not mounted. Opening the tray should be easy. Ejecting/opening now." rm -r "$" sysctl -w dev.cdrom.autoclose=0 # Ensure drive doesn't auto pull tray back in. eject exit fi else echo 'The directory "$" does not exist. Ejecting/opening the tray.' sysctl -w dev.cdrom.autoclose=0 # Ensure drive doesn't auto pull tray back in. eject exit fi >
Closing the Tray
For completeness, you can add this alias to your .bashrc ( or .bash_aliases file) to pull the tray back in from the command line. You do not need to be root.