Mounting a CD-ROM on HP-UX

This article describes how to mount and unmount a CD-ROM on HP-UX. To mount a CD-ROM, as the user root, perform the following steps one time:

  1. Determine the device address for the CD-ROM by entering the following command:
    # ioscan -C disk -f -n

    Output similar to the following is displayed. This output example indicates that the CD-ROM device file is /dev/dsk/c1t2d0:

    Class I H/W Path      Driver  S/W State  H/W Type  Description
    ===========================================================================
    disk  0 8/0/19/0.6.0  sdisk   CLAIMED    DEVICE    IBM     DDRS-39130WS
    /dev/dsk/c0t6d0   /dev/rdsk/c0t6d0  
    disk  1 8/16/5.2.0    sdisk   CLAIMED    DEVICE    TOSHIBA CD-ROM XM-6201TA
    /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0
  2. Create a new directory called /cdrom at the root of the file system. This directory becomes the CD-ROM mount point; all CD-ROM files appear under this directory.
  3. Determine whether the pfs daemon is running by entering the following command:
    # ps -ef | grep pfs

    If the pfs daemon is running, output similar to the following is displayed:

    root  1681  1651  0 11:39:20 pts/ta    0:00 /usr/sbin/pfs_mountd
    root  1682  1681  0 11:39:20 pts/ta    0:00 pfs_mountd.rpc

    If the pfs daemon is running, go to Step 6. If the pfs daemon is not running, complete Step 4 and Step 5 before trying to complete Step 6.

  4. Edit the file /etc/pfs_fstab by adding a line similar to the following to indicate the hardware path for the CD-ROM:
    /dev/dsk/c0t6d0 /cdrom pfs-rrip xlat=unix 0 0
  5. Enter the following commands. You must reenter these commands any time that you restart your system.
    # nohup /usr/sbin/pfs_mountd &
    # nohup /usr/sbin/pfsd &
  6. To physically mount the CD-ROM, place the CD-ROM in the machine and enter the following command:

    # /usr/sbin/pfs_mount /cdrom

Unmounting a CD-ROM

After you finish using the CD-ROM, enter the following command to unmount it:

# /usr/sbin/pfs_umount /cdrom

You can now eject the CD-ROM.