HP-UX UNIX Mount CDROM ( CDFS ) Filesystem Command

Q. How do I mount CDROM media under HP-UX UNIX System from a shell prompt? How do I automount CDFS file system using /etc/fstab file?

A. You need to use standard mount command to mount the CD (data CD or ISO9600 format cd). You must login as the root user to perform following operations.

ADVERTISEMENTS

Step # 1: Find CDROM device name

Ypu need to use ioscan command to find out the block device file name located at /dev/dsk directory. Without the block device name, you will not able to use CDROM. Type the following command to view CD-ROM device name:
# isoscan -funC disk
Where,

  • -F : Generate a full listing, displaying the module’s class, instance number, hardware path, driver, software state, hardware type, and a brief description.
  • -u : Scan and list usable I/O system devices instead of the actual hardware.
  • -n : List device file names in the output. Only special files in the /dev directory and its subdirectories are listed.
  • -C disk : Scan the system hardware and list all the devices belonging to the disk device class.

Step # 2: Create a mount point

Next create a mount point for CD-ROM such as /cddisk, enter:
# mkdir /cddisk

Step # 3: Mount the CD

Mount the cd, enter:
# mount -o ro /dev/dsk/cXtYdZ /cddisk
Replace /dev/dsk/cXtYdZ with actual device name such as /dev/dsk/c1t3d0:
# mount -o ro /dev/dsk/c1t3d0 /cddisk
To access file use normal UNIX cd, ls, cp commands, enter:
# cd /cddisk
# ls
# cp file /somewhere/else

Step # 4: Update /etc/fstab

Update your /etc/fstab file for automatic mounting, enter:
# vi /etc/fstab
Append following line, enter:
/dev/dsk/c1t3d0 /cddisk cdfs ro 0 0
Save and close the file. Use mountall command to mount all file system listed in /etc/fstab, enter:
# mountall
Above will mount all unmounted file systems listed in /etc/fstab.

Step # 5: Unmount the CD

To unmount the cd, enter:
# umount /cddisk

Further readings:

  • man pages mount, ioscan, mountall
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
4 comments… add one
  • amit kumar Dec 8, 2008 @ 5:40

    simple and excellent way to install cd-rom.
    thanks
    amit kumar

  • sya_laila Nov 16, 2010 @ 7:19

    very helpful.. thanks

  • golimar Mar 1, 2012 @ 13:38

    Beware of the typo (“isoscan” -> “ioscan”)

  • Stoyan Stoyanov May 28, 2016 @ 12:58

    HP-UX and CD/DVD formats have been a tricky thing for many years.
    To mount iso, you need to install one specific depot – it is available for free

    How to mount an ISO image
    Check if you have the module loaded (if loaded – skip the swinstall)
    root@host:/root> kcmodule fspd
    Module State Cause Notes
    fspd loaded explicit auto-loadable, unloadable

    Install the depot:

    root@host:/root> swlist -s ./ISIMAGE.depot
    # Initializing…
    # Contacting target “host”…
    #
    # Target: host:/root/./ISIMAGE.depot
    #

    #
    # Bundle(s):
    #

    ISOIMAGE-ENH B.11.31.06 ISO Image mount Enhancement
    #
    # Product(s) not contained in a Bundle:
    #

    PHCO_39672 1.0 CDFS mount(1M) cumulative patch
    PHCO_39673 1.0 mount(1m) patch
    PHCO_39674 1.0 umount(1M) cumulative patch
    PHCO_39675 1.0 mount_cdfs(1M) man page patch

    1 – Preview:
    root@host:/root> swinstall -p -s ./ISIMAGE.depot \*
    2 – Real:
    root@host:/root> swinstall -s ./ISIMAGE.depot \*

    Load the module and mount the iso

    # kcmodule fspd=loaded
    # mount -F cdfs -orr /path/to/iso /mountpoint

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.