Mounting ISO Images On AIX

UPDATE – Chris Gibson pointed out that with AIX 6.1 you can use a loopback device like Linux.

I recently heard someone discuss how to handle ISO images on AIX. On Linux, you can mount the ISO image as a filesystem, which is pretty slick.

Starting in AIX 6.1, you can use the loopmount command to create a loopback device and mount an ISO directly:

loopmount -i cdrom.iso -o “-V cdrfs -o ro” -m /mnt

And, loopumount unmounts the ISO and removes the loopback device:

loopumount -i cdrom.iso -o "/mnt"

There are a couple of gotcha’s, but nothing unusual. An ISO can only be associated with one loopback device at a time, the mount is only readonly, and it’s not supported in WPARs.

But, AIX previous to 6.1 doesn’t support mounting ISO images directly. The recommendation was to mount the ISO as a virtual optical drive on the VIOS. But, I don’t use VIOS because it hasn’t gained uptake in our environment and with our vendors. You can always burn the image and mount the CD, but if your optical drive is tied up on another LPAR you may not be able to move the optical drive to the right LPAR.

There is another way to mount those images, but it’s not a one-step process. What you need to do is create a LV at least as big as your ISO image, then copy the ISO data to that LV, and then mount the LV:

mklv -y cdlv -s n rootvg 704M hdisk0
dd if=cdrom.iso of=/dev/cdlv
mount -v cdrfs -o ro /dev/cdlv /mnt

One Comment

    Chris Gibson

    Check out the loopmount command in recent TLs for AIX 6.1 and 7.1.

    “Associate an image file to a loopback device. Optionally, make an image file available as a file system via the loopback device.”

    $ loopmount -i cdrom.iso -o “-V cdrfs -o ro” -m /mnt



Leave a Reply

Your email address will not be published. Required fields are marked *