Mounting ISO Images on Illumos

I always have to look this up, so I’m wiring it down. To mount an ISO image on Solaris derived systems, do the following:

lofiadm -a /path/to/image.iso /dev/lofi/1
mount -F hsfs -o ro /dev/lofi/1 /path/to/mountpoint

Mounting ISO Image Files On Solaris

More and more, software is distributed in the form of a downloadable ISO image. This is handy because you can then burn it to a CD or DVD, but many times you just want to install it without having to make a disk first. Linux makes this fairly easy, but it’s a little trickier with Solaris. You have to use the “lofiadm” command to first create a block device for the image before you can use “mount” to mount it as a filesystem. Here is the commands.

Make the block device with “loviadm”:
lofiadm -a /path/to/your/image.iso /dev/lofi/1

Mount the image as a read-only filesystem:
mount -F hsfs -o ro /dev/lofi/1 /mountpoint