Mounting an ISO image on a Solaris with lofiadm

Given an ISO image in /home/images/my.iso, a loopback file device (/dev/lofi/1) is created with the following command:

lofiadm -a /home/images/my.iso /dev/lofi/1

The lofi device creates a block device version of a file. This block device can be mounted to /my/mounted/iso with the following command:

mount -F hsfs -o ro /dev/lofi/1 /my/mounted/iso

These commands can be combined into a single command:

mount -F hsfs -o ro `lofiadm -a /home/images/my.iso` /my/mounted/iso

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.