loopmount Command

Purpose

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

Syntax

loopmount { -i imagefile | -l device } [-o mount options -m mountpoint ]

Description

This command is similar to mount except that it creates a loopback device if not specified, binds the specified file to it, and optionally mounts it. If the command implicitly creates a new loopback device, it sets the temporary attribute in CuAt to yes so that it will be deleted by subsequent loopumount or reboot. All the restrictions and features of the mount command apply to loopmount also.

Flags

Item Description
-i Specify an image file name such as an ISO image. This must be specified if –l is not specified.
-l ODM name of a loopback device such as loop0, loop1, etc. This must be specified if –i is not specified.
-o Options for the mount command.
-m Mount point such as /mnt.

If –l and –i are both specified, the imagefile is associated with the device before mounting it.

Security

Privilege Control: Only the root user and members of the system group should have execute (x) access to this command.

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. The following mount an ISO image on /mnt.
    $ loopmount -i cdrom.iso -o "-V cdrfs -o ro" -m /mnt
  2. The following mounts a disk image on /mydisk with loop2. The image file was bound to loop2 earlier with chdev command.
    $ loopmount –l loop2 –o "-V jfs2 –o rw" -m /mydisk
  3. The following mounts an image file bound to loop0 on /mnt.
    $ loopmount –i mycd.iso –l loop0 –o "-V cdrfs –o ro" -m /mnt

Files

Item Description
/usr/sbin/loopmount Contains the loopmount command.