IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > AIXV53MntISO
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
AIXV53MntISO
Added by OneSkyWalker, last edited by OneSkyWalker on Aug 30, 2008  (view change)
Labels: 
(None)

How to mount a ISO image on AIX V5.3

The following instructions were cribbed from the Howto mount an ISO image in AIX UNIX article. My thanks to Vivek Gite for posting it. Any errors in this article are, of course, not Mr. Gite's responsibility. And Richard Brader published a very similar How to Mount an ISO File in AIX and Linux article which I tripped across after I publshed this one.

  1. Create a logical volume which is large enough to hold the ISO image:
    p520-sr4:/ # /usr/sbin/mklv -y testiso -t jfs rootvg 1
    testiso
    p520-sr4:/ #
    

    where:
    o testiso is the name of the logical volume,
    o rootvg is the name of the volume group in which the logical volume is to be created, and
    o 1 is the size of the logical volume in logical partitions.

    Use the command lsvg rootvg to display (among many other things) the (logical and physical) partition size which will be used in rootvg. See here for more information about the AIX V5.3 mklv command.

  2. Define a read-only JFS filesystem on the logical volume:
    p520-sr4:/ # /usr/sbin/crfs -v jfs -d testiso -m /testiso -An -pro -tn -a frag=4096 -a nbpi=4096 -a ag=8
    Based on the parameters chosen, the new /testiso JFS file system
    is limited to a maximum size of 134217728 (512 byte blocks)
    
    New File System size is 65536
    p520-sr4:/ #
    

    where:
    o testiso is the name of the logical volume created in the first step and
    o /testiso is the mount point of the filesystem.

    See here for more information about the AIX V5.3 crfs command.

  3. Copy the contents of the ISO image to the logical volume:
    p520-sr4:/ # /usr/bin/dd if=/tmp/bestprac.iso of=/dev/rtestiso bs=1m
    0+1 records in.
    0+1 records out.
    p520-sr4:/ #
    

    where:
    o testiso is the name of the logical volume created in the first step, prefixed with the character r and
    o /tmp/bestprac.tar is the ISO image file to be examined.

    It may be necessary to use a block size (bs=1m) of less than a megabyte if the logical partition size is less than a megabyte. See here for more information about the AIX V5.3 dd command.

  4. Change the filesystem type to cdrfs:
    p520-sr4:/ # chfs -a vfs=cdrfs /testiso
    p520-sr4:/ #
    
    Note

    It is possible to mount the filesystem by overriding the filesystem type with mount -v cdrfs /testiso, but other problems occur when the time comes to remove the filesystem:

    p520-sr4:/ # rmfs -ir /testiso
    rmfs: Warning, all data contained on /testiso will be destroyed.
    rmfs: Remove filesystem: /testiso? y(es) n(o)? y
    rmfs:  0506-933  /dev/testiso is not recognized as a JFS filesystem.
    rmfs:  0506-936  Cannot read superblock on /testiso.
    rmfs: Unable to clear superblock on /testiso
    rmlv: Logical volume testiso is removed.
    p520-sr4:/ #
    
  5. Mount the filesystem:
    p520-sr4:/ # /usr/sbin/mount /testiso
    p520-sr4:/ #
    

    The filesystem contains the files which are in the ISO image file /tmp/bestprac.tar:

    p520-sr4:/ # cd /testiso
    p520-sr4:/testiso # ls
    bestprac.tar.gz
    p520-sr4:/testiso #
    
  6. When the filesystem is no longer needed, unmount and remove it and then remove the testiso logical volume:
    p520-sr4:/testiso # cd
    p520-sr4:/ # /usr/sbin/umount /testiso
    p520-sr4:/ # /usr/sbin/rmfs -ir /testiso
    rmfs: Warning, all data contained on /testiso will be destroyed.
    rmfs: Remove filesystem: /testiso? y(es) n(o)? y
    p520-sr4:/ # /usr/sbin/rmlv testiso
    Warning, all data contained on logical volume testiso will be destroyed.
    rmlv: Do you wish to continue? y(es) n(o)? y
    rmlv: Logical volume testiso is removed.
    p520-sr4:/ #
    

    where:
    o testiso is the name of the logical volume created in the first step and
    o /testiso is the mount point of the filesystem.

    Be very careful with rmfs. Like the UNIX rm command, rmfs without the -i flag does not prompt for confirmation. It immediately destroys the specified filesystem!
    Notes:

  • The rmfs -r flag will cause the mount point directory to be removed only if the directory is empty.
  • The rmfs command will remove the underlying logical volume when removing a JFS or JFS2 filesystem, but will not do so when removing a CDRFS filesystem.

The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the Add Comment link at the bottom of the page to provide feedback. Note: Until you log in (using the link in the upper right corner of this web page), you will not see the Add Comment link and you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.


 
    About IBM Privacy Contact