IBM Support

Mounting an ISO image in AIX

How To


Summary

How to mount an ISO image in AIX.

Objective

Banner_AIX
How to access files in an ISO image on AIX without having to burn the media

Environment

This will work on any recent standard installation of AIX for CD/DVD ISOs but some older versions of AIX will not support the UDFS ISOs used for USB sticks.

Steps

Have you ever used loop devices to mount an ISO image rather than burning it to media eg: in Linux?
Do you wish you could do the same in AIX?

Well, why don’t you?

Firstly, we can see that nothing is mounted on /mnt
/# mount | grep mnt

Then we mount an ISO image (of a CD or DVD - see later for an ISO of a USB memory stick)
/# loopmount -i /tmp/AIX616_dvd1.iso -m /mnt -o "-V cdrfs -o ro"

And we can now see that it is mounted
/# mount | grep mnt
         /dev/loop0       /mnt             cdrfs  02 Nov 17:54 ro

And we can access it:

/# ls /mnt
6100-06      image.data  OSLEVEL  README.aix  RPMS .Version
bosinst.data installp    ppc      root        usr

Then we can unmount it
/# loopumount -l loop0 -m /mnt
/# ls /mnt
/# mount | grep mnt
/# ls mnt
/#

The commands are in the devices.loopback.rte fileset which is installed by default.
/# type loopmount
loopmount is /usr/sbin/loopmount

/# lslpp -w /usr/sbin/loopmount
  File                                Fileset                  Type
  -----------------------------------------------------------------
  /usr/sbin/loopmount                 devices.loopback.rte     File

/# lslpp -w /usr/sbin/loopumount
  File                                Fileset                  Type
  -----------------------------------------------------------------
  /usr/sbin/loopumount                devices.loopback.rte     File
/#

More recent versions of AIX and VIOS may be shipped/downloaded with ISO files for USB memory sticks. In this case, you need a slightly different command as the format of the filesystem is not cdrf but UDF:

loopmount -i flash.iso -o "-V udfs -o ro" -m /mnt

So, with loopmount and virtual optical devices,

You hardly ever need to write media and can do installations, upgrades etc remotely.

This is particularly useful if the Optical Drive is many miles away from your keyboard      Laughing

Additional Information

You can contact me: 

Document Location

Worldwide

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"HW1A1","label":"IBM Power Systems"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
03 May 2021

UID

ibm11117041